Go

Like it or not, this is a awesome language.

Attached: guaranteed_replies.png (768x432, 164K)

Other urls found in this thread:

quarkus.io/
twitter.com/NSFWRedditGif

I like it.

Needs generics though.

I like it, i've been checking it out lately and it reminds me of C# too. So far it seems like a less bloated C#, not that C# is too bloated but whatever.

Jewgle botnet
slide thread

I kinda want to learn it, redpill me.
Right now I like:
Haskell
C++
C

Go's niche is web services. If the industry cared about performant and type-safe code they'd stop using NodeJS and Python and move to Go.

Go will never replace C/C++, but it might replace Java if you can get over the lack of stuff like generics (until Go2 comes out).

It's basically the opposite of Haskell. It's kind of a bit of a chore to write and the type system is really weak and it complains about dumb shit like unused variables and missing commas. Yet it's a pretty productive language, it's reasonably fast had good tooling, nice lang features like higher order functions, has pointers. Once you accept "gos way" of doing things the language just gets out of the way and you don't have to think about it after awhile. That's something you don't really get with something like Haskell or rust, you always have to think about the languages semantics

your brain on Jow Forums

I actually like how autistic the compiler is about making sure your style is right.

what are generics?

I'm not a CS person but I think of generics like C++ templates. Compile-time function generation for different types.

Golang has interfaces, which are run-time and have performance overhead. Interfaces also require a lot of boiler-plate code.

Golang2 is apparently getting "contracts" which is how they're implementing generic compile-time polymorphism.

Jow Forums isn't your safe space kike.

>Go's niche is web services.
I'm not sure cloud services counts as 'niche' these days, and Go is very prominent here with Kubernetes and Docker.

Will be interesting to see if it can broaden its reach to other areas, I guess it somewhat depends on what Go2 brings to the table.

Rob Pike? Is that you?

Generics are a crutch. You should know what you want to do and write the code to do it. Everything else is bloat.

I do know what I want to do, which is re-use functions with different types.

Then write them.

>just duplicate your code every time you write a new type, and keep them all up to date
you're fucking retarded and have no idea what you're talking about

>Needs generics though.
this is the most successful meme ever, the needs generics meme gets quoted in about every conference talk about Go

Im not even going to explain why this is retarded, Im going to let the retards just keep repeating something over and over that can't exist

or you could use a language that does it for you

TypeScript and Go are the white man's programming languages.

It is mostly a meme and go really doesn't need generics that bad.
Fixing the verbose error handling would be prio 1 on my list (I like the check/handle proposal).
But generics would really be useful in some places. Generic datastructures or the god damn math package.

>this is the most successful meme ever, the needs generics meme gets quoted in about every conference talk about Go
Did you ever consider this might be the case because it's true? Or does your dogma not allow for that possibility?

Then go write python brainlet

>no generics
>awesome
okay

I like a compiler that enforces MY style rules. I will not use one that enforces its OWN style rules.

Imagine there are people who use this "language" even though quarkus.io/ exists.

that's like saying you're smarter because you walk to work instead of driving a car

Go 2 has generics though.

>has
you mean "will have"

>quarkus.io/
unironically looks like a meme coin website

As a new C++ programmer is this because of the unreadable nature of templates?

go has no templates or generics

another meme to support the meme the suckers already went for

there is no end to this shit, 5 years from now there will be Go threads where everyone is going to say that Go will have generics in the next version

I mean is "needs generics" a meme because of how bad it is in C++

Wasn't really impressed with it. Its performance was poor and its type system was as useless as C's.

I like it. Nice and simple

It's not a meme, it's unironically true, perhaps overstated because you can program without them
it's just why the fuck would you when you could have them
there's no excuse for a new language not to have templates or generics or something equivalent

Any good materials (books if possible) for learning Go?

holy christ everything is a web server

Okay I see

Get with the times grandpa. Now it's Python, Go, Rust.
We make tools to create better tools with that tools. Are you going to cut your meat with a sharpen rock?

C and C++ still have their niche, but I think that's going to basically be systems programming - the space from kernels and deep embedded up through native graphical applications and games. Rust will take a piece of that space but not all of it.

generic has its place, see Rust `Option`.
shit is beautiful.

A lot of networking protocols, frameworks and databases are written in C/C++. The backend of Node is mostly in C++.

this. reified generics are BLOAT.

Literally what of any significant use has been made with GO?

Docker and Kubernetes

Nah, sounds like the XY problem.

Like how an OOP expert thinks every problem needs five factory classes and dependency injection. Not everything needs to be genericized and templatized. Just write a bit of code to do whatever you need to do at the moment. 90% of "muh generics" problems are just people who are allergic to writing 20 lines of a simple data struct or algorithm (or don't know how to) and must import a library implementing some basic data struct or algo, therefore generics in a language is a must so you can reuse that basic shit with every conceivable type.

>Just write a bit of code to do whatever you need to do at the moment.
yes and then you need to do the same thing to a different type and you write the function again, because you have no generics! have you ever fucking written a program longer than 100 lines?

>Plummeting in the tiobe index
>Google not mentioning it once in their I/O 2019
>Trannies doing dick jokes in the conferences about it
>Only one worthwile software, which is Docker, and it was originally a Python software anyway

Lmao

Attached: 1551068935875.gif (302x268, 1.39M)

Interfaces. Heard of them? Easy to create, implictly satisfied. If that's not enough to scratch your itch in any particular situation, you very likely have an architectural problem. Most people are really bad at detecting those.

To be honest, I'd rather have generics not included in Go2.

>Muh Generics

How many times have you written functions that can take in different types of variables that arent numbers(so not float,int but float/string for example)and have the exact same code for them?

do they work for primitives?

Why are you excluding numbers from your question when they're the most common use case? Arrays are probably the second most common, and then there's other generic collections

I'm 18

>Why are you excluding numbers from your question when they're the most common use case?

Just use doubles instead of ints and you are set works for every number works in most cases

Literally made for retards.

I only use it for rapid prototyping. It's a good replacement for p*thon, also a language made for retards.

so your answer to not having generics is just to use doubles for everything
well I can't see any disadvantages there, why the hell didn't I think of that

Well, you can create type aliases and declare methods on those. So, yes.

But wanting to work with primitives hardly seems justification for adding generics anyway.

not wanting to retype a function for 16 or so different data types isn't a good reason?

>Retype
>ctrl c ctrl v

meant for this bad boy

Yes that qualifies as retyping
What kind of fucking argument is that, you can copy paste so who cares about not repeating yourself lmao

inb4

>Go3 looks just like C++

this is insane boilerplate and runtime overhead, you plebian.

Thats exactly true

>muh beatiful code

Shut the fuck up

>>Google not mentioning it once in their I/O 2019

I actually interviewed at Google and they were all "Python and Java". I was trying to impress them going "Go sounds cool.. it'd be great to learn that here" and the guy actually goes "lol, we have one guy that writes Haskell and that makes it popular in this team than Go".

Its not about beautiful code, it's about not having to write shit when the computer could do it for you
You know, the entire reason programming languages were invented

*sigh* You're doing it wrong.

Creating enough for the most general of the number types (int64, uint64, float64) and expecting callers to cast their uint8 shit themselves is likely the way to go there. If, for some weird reason, that doesn't work for you, just accept interface{} and do a manual type switch with reflection.

I agree that this is not the same level of comfort you can get with generics but I see it as a strawman argument and definitely NOT a valid reason to clutter up the language with generics.

>it's about not having to write shit when the computer could do it for you
You are still writing a fucking problem only it has some functions retyped god fucking damn it

You are suggesting alternatives with performance overhead, fucking reflection, seriously?
Who the hell taught you to program? What is the downside of having a perfectly useful and usable feature in a language? It's like, why have a division operator, it just clutters up the language, you can get by without it! Sure I can, but why the fuck would i?

Its not about not wanting the feature
Its about constantly crying that not having it is like the end of the world

I dont even fucking use Go cause its syntax looks like shit to me but muh generics is so fucking boring

That's right. Programming languages exist to reduce the amount of reptitive work a programmer has to do. Not having to repeat yourself is expressive power.

It's easy to get by without them, all it does it beg the question, why would you intentionally design a language in 2019 without it?

Yes, those are bad solutions. To a problem which never arises. So what? If you want to get every last bit of performance and save memory at all cost, use C.

Go is not the right language for every problem. I never had this kind of problem where I used it and I don't see myself bumping into that anytime soon.

Isn't Go supposed to be a C replacement? I have situations where I could use generics all the time

Fuck if i know

>Subtype polymorphism is a replacement for parametric polymorphism
Please return only when you understand the basics of PLT.

cringe

>Isn't Go supposed to be a C replacement?
It is in some situations. There is a tradeoff involved.

>I have situations where I could use generics all the time
As I wrote in an earlier post, there might be an architectural problem. Or you might be solving the wrong problem. Or maybe Go just isn't the right language for the job. There's a reason I wouldn't recommend it as a first language to anyone.

Also, something that constitutes an architectural problem in Go may be no problem at all in another language. It is very opinionated in that regard.

Why do you assume a problem which you can use generics to solve must be the wrong problem

Read it again. That was one of several scenarios I could think of.

no that was the essence of what you said
"if you need generics, you really don't, you're just thinking about it the wrong way"
Sure, if I dont have generics I have to solve the problem some other way, doesn't change the fact the best solution would be using generics

>the best solution would be using generics
It well might be in some scenarios. Not enough to justify adding them as they are used excessively by lazy programmers and I really wouldn't want that in a language focusing on simplicity.

>Or maybe Go just isn't the right language for the job.
That was something else I said. Good fucking luck with C++.

Try C++. Good fucking luck with that.

just because you can abuse a useful feature doesnt mean you shouldnt have it
you're advocating for design-for-idiots

Like I said (twice, due to poor editing): Try C++ and see how far you get.

Leaving out unnecessary features is pretty much the whole point of Go (besides making concurrency easy). It's not for you. Get over it and use something else.

But what if your style is wrong

Imagine being this brain-damaged.

>a language focusing on simplicity
>no generics

uh... huh

>Plummeting in the tiobe index
tiobe index is a fucking joke, Visual Basic NET is the fifth most popular in their top 20, at least Go made it into the top 20 which is more than can be said for Rust.

>Google not mentioning it once in their I/O 2019
There's nothing to mention until Go 2.0, the language is stable and unexciting.

>Only one worthwile software, which is Docker, and it was originally a Python software anyway

No, Docker was always written in Go you retard. And Kubernetes has superceded it as the primary Go project.

>they are used excessively by lazy programmers

Attached: 1487881739407.jpg (473x356, 13K)

>dumb shit like unused variables and missing commas.
Your code shouldn't have that.

It's a slightly less cancerous language than java and python, primarily used for backend webshit and general scripting.

> was employed to help develop Go
> still uses C

Attached: ken-thompson.jpg (1619x2024, 2.42M)

Go is a language created by Google to help make programming projects more productive and scalable. This means:

- Having a small feature set so it's quick to learn, low surprises, and you won't have to think about what feature best fits. It's like C in this aspect
- Extremely quick garbage collection, to the order of nanoseconds.
- Unironically very sweet package management. You can reference Go libraries from GitHub repositories and it works just like packages from the standard library.

The only thing I find is missing is templates/generics if you need more than a simple data structure. Like ffs, everything from Java to Lisp has them.

>an anemic feature set which prevents programmer from both fine tuning and high level abstractions.
>completely average garbage collection and lack or manual memory control precludes it from use in demanding systems tasks
>a lazy package manager which relies on github repos.,Absolutely retarded library management which makes working on projects with different library versions awful.

IPFS
Syncthing
Docker
Hugo

>write a bait thread
>gophers descend on the bait without second thought
I’m convinced gophers are google bots at this point.

Attached: 75C99A55-54B9-4036-BF99-A4D7DD780D2E.jpg (657x527, 38K)

I'm packaging over 1,000 Go libraries for my distro. It's hell. Docker is especially shitty by pinning old versions, forking code for no reasons and using code that the dev said it was not meant to be use in production. I don't know how they don't have a tons of CVEs for using broken code.