GO

Enlighten me on this fucker.

Did Google actually make something good?

Attached: 1 84i2YOy5finvR2Z_AfLCMA.png (1200x674, 632K)

Other urls found in this thread:

jetbrains.com/lp/devecosystem-2019/
insights.stackoverflow.com/survey/2019#technology
gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
github.com/golang/go/wiki/SliceTricks
twitter.com/AnonBabble

No

its like C++ but without it being good

this

It's C but with overloading, interfaces, some concurrency primitives and a GC.
That's about it.

>its like C++ but without it being good
C++ was never good

Here's a nickel, buy yourself a C99 compiler

It's decent. It's not great since it has some issues. But it's a very simple programming language with great concurrency features that can be easily picked up, while being a static language. There is a reason it's actually being used in projects.

Should I learn go before C?

My shitty euro university taught us Java

so a good version of C?

Depends on your needs. If that sounds good to you then it's good.

no generics LMAOOOOOOOO

If you know Java, you should take a look at Kotlin. Also, Java isn't as bad as some people here make it. It's used everywhere for a reason

Fucking cniles i swear

>There is a reason it's actually being used in projects.
>plumments in the tiobeIndex in your path

Attached: ab45f2a622a785b93f802a766ff9b4cade9bd29e.png (841x1200, 538K)

>it's popular therefore it's good!
Argumentum ad populum

He literally claims it's used everywhere for a reason, i.e. because it's good, and not it's good because it's used everywhere. But congratulations on the new word you learned a few days ago and eagerly awaited to use.

I see reading comprehension isn't your strength. I said there IS a reason it's popular. Just because I didn't spoonfed it to you, doesn't mean it doesn't exist, just that you have to look for it.

Also, if you had to hire people to work on your project, you'd see why its popularity is an actual strength. You'll understand it someday, when you get a job.

fpbp
>>>/tumblr/

Systems programming in C originally meant creating apps like grep on a POSIX based system, with pipes, select, fork/join. Go is a more modern and featureful language that serves the same niche.

>He literally claims it's used everywhere for a reason
Yes
>i.e. because it's good
Wrong
>and not it's good because it's used everywhere.
Wrong again. Allow me to paraphrase:
>Java isn't that bad guys because it's used everywhere for a reason! :D
is a logical fallacy, an appeal to popularity.
>But congratulations on the new word you learned a few days ago and eagerly awaited to use.
Checkm8 ;)
I see logic isn't your strength.
>Just because you can't see it doesn't mean it doesn't exist
Is the moon made of cheese now you nitwit? If I can't see it tjhen by your logic it should exist!

WOW

But do lecture me on the advantages of doing a code monkey job that pays less than minimum wage. Why don't you go ahead and tell Jow Forums why Java is such a good language for Indians?

Define "good"
Is it good for quickly churning out backend software?
Is it good for writing legible, uniform code?
Is it good in compile time and in catching programmer errors?
Is it good at being fun?
Is it good at giving you freedom?
Is it good at creating abstractions?
The answer to some of these is yes, to others, no.

it probably has the lowest cognitive load out of any language i can think of

Why don't use JS for everything?

Can you write an OS in go?

I hope you're just baiting with that logic.

yes

Should you?

fucking useful, m8.

Monsieur, you do have a fine taste in things perverted and vile

Correct me if I'm wrong, but I don't think you can. You can't inline asm on go, and I don't think you can link them together.

Each architecture has a unique bit of initialization that has to be done in asm, I think you'd need something to glue them together... Probably in C?

Care to guess where the line is drawn?

Chrome was good and google as a search engine was good. Emphasis on the was.

Go used to be written in C but now it's written completely in Go, including the compiler to different architectures
start at
${GOROOT}/src/cmd/compile/README.md

If you think businesses are a good indication to design technologies they use as bad or good you're going to be sorry.

java is going to decline in use very rapidly too because of Oracle going retarded with licensing so yeah.

what are generics?
I thought generics were just used to filter types? is that not it?

Generics= parametric polymorphism
This means functions and types can take parameters of types, not just data. Usually you use syntax rather than () for the type argument list.
You can define a function like List foo(List in). This will take a List of T as an argument and also return one. No you don't have to downcast to a nondescript List and then manually cast back up to a List of T.

Go was literally made so retarded bootcamp code monkeys could be Google wage slaves too

>Go was literally made so retarded bootcamp code monkeys could be Google wage slaves too

And yet only one in 10,000 passes their interview

Sounds like you got filtered past the first fizzbuzz

It is pretty decent, well-researched and has the second best concurrency primitives after Erlang.

Generics is just nonsense, compared to all the nice things.

It is THE server side language nowadays.

Generics are a lot nicer than shit you can get in a library

There's a reason Docker and Syncthing are written in Go, you know. So yeah, it's pretty good... and comfy to write, like C!

Attached: 1532578656579.png (323x308, 42K)

>-std=c11

Lol no generics. It's all you need to know about Go.

So assuming no prior programming experience, its a good first language then? Or is C# much better for that?

Start with Lisp, it's the best for a beginner.

Go is OK for beginners indeed. Also take a look at Python.

And don't listen to this fucker

>So assuming no prior programming experience, its a good first language then? Or is C# much better for that?
It's too late to start learning
Pajeets are flooding the job applications and will work for 30% of your pay

>Python
Fuck Python. Scripts and pseudocode that forms bad habits,

Somewhat correct, they also did it to keep Rob Pike happy at Google. Making software devs productive with little training is not a bad thing.
t.Mgmt

Yeah Go is brainlet friendly.

>just that you have to look for it.
he is asking you what are your arguments about it. Why is it good ?

>Java isn't as bad as some people here make it. It's used everywhere for a reason
it's used everywhere for a reason is literally : people use it therefore it is good and I should use it.

So now I'm waiting for your arguments of "why java is good".

Holy shit. Ok, I'll bite. I hope you don't call yourself a programmer.
First of all, the logic in "it's used everywhere for a reason" is "quality implies usage". "People use it therefore it's good" is "usage implies quality". How dense one has to be to not get that?

Now about why Java is good:
- The JVM is arguably the best (fast, portable, stable) platform to run on for a LOT of use cases
- The language doesn't leave too much space for incompetent people (most people) to mess the whole thing up
- Vast and mature ecosystem
- Abundant workforce available

Feel free to enlighten me on a single other language that gives me all this. I don't give a shit if you find it verbose, restricting or boring.

>The JVM is arguably the best
It has an awful security record and support for it is dying.
>The language doesn't leave too much space for incompetent people (most people) to mess the whole thing up
The language is 75% boilerplate, 5% logic, 10% exception handling and 10% unit testing.
>Vast and mature ecosystem
Dying ecosystem.
>Abundant workforce available
Pajeets.

>Dying ecosystem
Couldn't be more false jetbrains.com/lp/devecosystem-2019/
insights.stackoverflow.com/survey/2019#technology
>Verbosity
Again, not a real problem. I don't like that aspect of Java too, and I'm looking into Kotlin, but a good IDE deals with all the boilerplate while maintaining the readability and safety.
>Pajeets
Yes, but not only. Some Indians are actually pretty good, usually those who leave India. The secret is never to outsource if you care about quality at all.

L I S P

it's object pascal/oberon with c like syntax

This is honestly the best description of it.

People constantly bitch about error handling or MUH TYPE T GENERICISM WAAAAH or fucking whatever, but really it's meant to be a compile-time optimized language and it's meant to be as simple and raw as possible without having to deal with memory management, because that reduces overhead and keeps it fast.
And true to its design it IS pretty fucking fast, at least in about half the use cases. It sucks dogshit at regex and string parsing tasks because of its Rune UTF8 system, which is a smart design but unoptimized.

It's C for retards but with the good parts of C removed, absolutely no modern features added like generics, no results/monads (err != nil), also it's garbage collected hahaha no.
However people can finally stop using Python, it's much better and is statically typed. Except when it isn't, because interface{}. Yuck.

no, bust still better than abomination called Rust

>i am a brainlet that parrots what other people say without thought

Can anyone tell me what language the ufo blob is supposed to be?

pretty much any of them

does it have CONCISE designated initializers that can be reordered and omitted at your choosing

not verbose, fragile, redundant, primitive "constructors" aka the worst thing ever

gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html

struct Thing {
int a, b, c;
float d;
};

struct Thing thingy32 = {
.d = 2.9,
.a = 100
};


if it doesn't have designated initializers, it is literally more primitive than c99.

struct literals exist and work basically the same way
that said there's nothing wrong with constructors

>Generics= parametric polymorphism
>This means functions and types can take parameters of types, not just data.
all (((generics))) does for you is hide all the different implementations you have to write, if you have a function that can take 10 different types, you have to write 10 implementations of that function and all templates are doing is giving you a single declaration to make you think that just one function is handling all these types. This is in direct contradiction to how Go uses interfaces that are basically duck typed and will take any kind of type that meets the interface definitions. Go is never going to have generics/templates because templates are meant to hide a mess that Go doesn't have which is locking methods to classes and requiring complete refactoring when data you want to pass into methods no longer fits a class type.
tl:dr C++ programmers are dumb fucks who can only see things in a OO way and want to turn every language into C++

>replies to generics
>talks about templates
not even gonna bother with this

>generics in C++ don't use templates
how stupid do you have to be to buy into C++ bullshit?

>If it doesn't have specific feature X it's no better than Fortran!
k

>struct literals exist
alright sounds better than c++

He's right though.
The only argument I ever hear about Go's genericism problems are from sepples programmers screeching that they can't write a totally generic template followed by 16 templates specific to types.

c++ is objectively worse than c, it's just ugly

>I can't take valid criticism
I've tried Go since gophers(?) say it's so good. It's shit.

generics in 90% of languages behave fundamentally differently to C++ templates. In particular:
> if you have a function that can take 10 different types, you have to write 10 implementations of that function and all templates are doing is giving you a single declaration to make you think that just one function is handling all these types.
this just doesn't hold for anything that isn't C++, Rust or D

where is this pervasive idea from Gotards that only C++ has any kind of parametricity coming from? especially when C++ templates are so distinct from every other implementation of parametric polymorphism

Okay but why?
It's fine not to like a language and all, but do you genuinely just not like the language or think it's garbage because ?

Because sepples and java programmers insist on EVERYTHING being genericized, even when it's utterly and totally pointless because only that one type is going to be used in that way. When you take that away from them they fucking explode.
It doesn't matter that every single case they demand be generic requires specialization anyways, the fact you can't just T type it is enough to send them into a spiral of unending confusion.

C++ templates are a fucking joke in terms of polymorphism, at any rate. Any actually usable C++ polymorphism template system ends up being recrusive or meta-templated, which is just a fancy way to say "I used macros without using macros!"

>Because sepples and java programmers insist on EVERYTHING being genericized, even when it's utterly and totally pointless because only that one type is going to be used in that way.
I can't think of a language that has parametric polymorphism that also doesn't lean heavily into it. Like I said the functional languages which invented the idea make everything parametric base everything around it because it's simply a really solid idea.

>C++ templates are a fucking joke in terms of polymorphism, at any rate. Any actually usable C++ polymorphism template system ends up being recrusive or meta-templated, which is just a fancy way to say "I used macros without using macros!"
Sure but why are you still going on about this? How many times do I need to say that C++ templates are shit and not representative of generics as a whole?

>How many times do I need to say that C++ templates are shit and not representative of generics as a whole?
For as long as Go gets dunked on for MUH GENERICS while people praise C++ for MUH GENERICS.

If a language has polymorphism baked in yes, it leans into it. You're absolutely right. Go doesn't. So it doesn't. But somehow that makes it garbage.

C++ templates are routinely criticised for their complexity. Compare something which is actually generic like Java and the only complaint is that it's not powerful _enough_. What the fuck are you doing if you aren't even managing to keep up with an underpowered 15 year old language?

>all this blabble
None of you guys have a job in programming I see

Hell I use Perl if I have too (regex, parsing)
We don't care for languages in the real world, we just use what we need for the job

I think you're missing the point.
It isn't that generics aren't powerful, it's that they've never been implemented correctly.
C++ templates are shit.
Java generics are shit (and slow as fuck).
There isn't the "right" choice for generics. They all fucking suck. Interfaces are a good enough 99% use case coverage fix, but there's no sense in putting in a broken-ass generics system into a brand new language. It makes more sense to wait and work through the problem anew and THEN put it in.

>Hell I use Perl if I have too
Spoken like somebody who's never used Perl. Anybody who uses perl wants to use it in place of every other common alternative because it's so fucking nice to use for text parsing.
I don't think YOU have a job.

>because it's so fucking nice to use for text parsing.
And not for everything else

And?

>It isn't that generics aren't powerful, it's that they've never been implemented correctly.
ML got it right the first time
>Java generics are shit (and slow as fuck).
literally the same performance as if you just used interfaces
>There isn't the "right" choice for generics. They all fucking suck. Interfaces are a good enough 99% use case coverage fix, but there's no sense in putting in a broken-ass generics system into a brand new language. It makes more sense to wait and work through the problem anew and THEN put it in.
generics cooperate so well with interfaces that it's foolish not to have one if you have the other

>And?
And my point was I'll deal with shitty Perl if a big part of my assignment needs to deal with parsing fucking text

I'm not wasting my time arguing about struct or generics and shit

>perl is good for text parsing
because no other language has implemented perl regexes right?

It's good that you learned Java. Now go and learn the good languages that run on the JVM, like Kotlin, Clojure, Scala, Common Lisp, etc. instead of posting cringe and learning a tranny language like Go.

>ML got it right the first time
It also isn't used. It's like how Haskell does typing right but it's too obtuse for real world use.
>literally the same performance as if you just used interfaces
Read a book you dumb fuck, you clearly don't understand how Java deals with generics.
>generics cooperate so well with interfaces that it's foolish not to have one if you have the other
Except for all the complications that arise from pure genericism that you don't know about because you're spouting bullshit from your uneducated ass.

Anybody will deal with whatever if their job makes them.

Nowhere near as efficiently, cleanly, or sanely, no. Aside from the sanity of the type system implemented in Perl.

Here's how to do basic operations on slices (which double as views into arrays AND dynamic list container):
github.com/golang/go/wiki/SliceTricks

Look at this and then tell me again that Go is "clear and unsurprising".

>Here's how to do operations on a feature that most other languages don't have or have to do similarly

>It also isn't used. It's like how Haskell does typing right but it's too obtuse for real world use.
Sure, but the parametric polymorphism aspect of the type system is simple, elegant and also not marred by any obvious flaws.
>Read a book you dumb fuck, you clearly don't understand how Java deals with generics.
You clearly don't understand. Generic parameters in java merely erased to their base class/interface types. A generic method T bar(T) compiles down to Fooable bar(Fooable). That's exactly the same signature you'd be writing in Go with exactly the same polymorphism overhead, but also doesn't litter your code with type assertions.
>Except for all the complications that arise from pure genericism that you don't know about because you're spouting bullshit from your uneducated ass.
Can you name some?

>Normal language:
>a.delete(i);
>Go:
copy(a[i:], a[i+1:])
a[len(a)-1] = nil // or the zero value of T
a = a[:len(a)-1]

>Sure, but the parametric polymorphism aspect of the type system is simple, elegant and also not marred by any obvious flaws.
Which meaningless if it's not used anywhere.
>You clearly don't understand.
No, you clearly don't understand. Java has a huge overhead on its generics because it JIT compiles them at runtime, meaning every time you hit a new type on some call it has to generate compile link and use the new class. It does none of this at compile time because Java was devised by retards, but also because now it gets all the runtime reflection benefits. Which is why Java is slow as fuck and only reasonable fast after 25 years of development optimizations.

In Go this is all 100% compile-time so proper optimizations can be applied, which is why it's faster than Java about half the time despite being less than a decade old.

>Can you name some?
Compiler optimizations
Compile time expansion
Infrastructure management (essentially the Enterprise Fizzbuzz problem)
Code generation and instruction cache exhaustion
Dynamic link performance hits
etc

a = append(a[:index], a[index+1:]...)
You're resizing an array, it makes perfect sense to create a newly sized array and reassign it. Otherwise you'd just a[i] = 0 or whatever.

You seem to be confusing Java for C#. Java's generics are literally just type erasure, producing the same bytecode as non-generic methods and being treated the same way by the VM.
It's C# which uses reification, creating a new class within the runtime for every application of type parameters.
And yeah, reification is shit despite whatever Csharts say. Not only is it subject to the problems you specify but it also makes it painful to implement more powerful type system features like HKTs on languages sharing the same VM. It really is just a noncommittal and half assed version of C++ templates.

I don't see anything here that doesn't apply to the non-generic methods receiving interface parameters. Seeing as how they both produce the same bytecode/assembly.

Go was made for developing web infastructure with high volumes of traffic, and supports that task well. It has a very succinct list of keywords (25) making the language easy to memorize and parse. It has a lot of useful features but you have to learn to do things "The Go way".

It's programming language after all, not a Mc Donalds.