top | item 38126571

Why people in Google hate Go?

28 points| altun | 2 years ago | reply

When you search "golang" on google for a long time, the question "Why people hate Go?" comes up at the top.

Now the blog post "A new way to bring garbage collected programming languages efficiently to WebAssembly" written by the team of V8 (JavaScript and WebAssembly engine) on the official website of Google has appeared.

https://v8.dev/blog/wasm-gc-porting

When I saw in the first paragraph of the blog that "we will get into the technical details of how GC languages such as Java, Kotlin, Dart, Python, and C# can be ported to Wasm" the question "Why people in Google hate Go?" arose

140 comments

order
[+] boxmein|2 years ago|reply
Go is an extremely productive language in our experience (large majority of the back-end is in Go).

Go excels in tooling and code sharing, and onboarding developers with Go is efficient.

It also has an extremely small runtime footprint, reducing ecological footprint and server costs :) An average JVM needs 500+ MB of RAM, whereas our average Go microservice hovers around 25 MB.

Last but not least, it is not tied to the existing C ecosystem, which is a HUGE value add in containerized environments where in the majority case you can make a Docker image that is based on `scratch`.

Of course there are some quirks (lack of try syntax for example), but Go programs are also simpler to comprehend due to intentional exclusion of AOP, try-catch, etc.

Lastly, the interface system is probably the most straight forward and simple for general programming :)

[+] evilc00kie|2 years ago|reply
> Last but not least, it is not tied to the existing C ecosystem, which is a HUGE value

They also provide their own crypto within the standardlib. No openssl needed.

[+] SureshG|2 years ago|reply
>An average JVM needs 500+ MB of RAM

We are running small services with heap size under 100 MBs and is absolutely possible with new JVM versions. If you want ever smaller without JIT, native image is also an option. Moreover in most scenarios, JVM provide better peak performance. So here is a tradeoff

[+] merb|2 years ago|reply
You can actually fine tune to run the jvm at the same memory footprint as go. It’s just not easy to do so. Especially since it lacks structure/value types.
[+] nappy-doo|2 years ago|reply
I worked on Go at Google for a couple of years.

First of all, I can't really parse your question, but I'll try to answer what I think you're asking.

Go isn't hated at Google – there's just a lot of other code in other languages. C++ and Java are the two most popular, with Python probably rounding out the top three. Go would probably be number 4 (discounting Javascript, because I'm really focused on backend or infra tech).

Go's performance is not as good as LLVM derivatives, but that's not what it tries to be. It's a simple language, that tries to be as helpful as possible to the programmer. I describe it as a big-boy python, but think of it as "the C I always wanted."

Generally, I don't need the performance of C++. I think lots of people that think they do are probably wrong, but I try to not argue on the internet. If I need to get something done, and get on to the next thing, I use Go. Do I leave cycles on the floor and have (very small) GC pauses – yes, but I get my stuff done, and IMO it's a small price to pay.

Use whatever language helps you get your stuff done. Stop arguing over languages.

--

Having said that, if the question is, "why aren't the WebAssembly people mentioning Go?" I don't know. Go's supported WASM for a long-time, and the people inside Google who care about WASM care about Go. There is new stuff in WASM not really taken advantage of in Go, but Go is also a strange animal with a strange stack model, and it takes time. I would think, as with all things Go, it'll be there, but it will take a little time, be thorough, complete, well thought out, and maintained roughly forever.

[+] altun|2 years ago|reply
There is a tragicomic story that I think is related to this question.

Quote from Ian Lance Taylor (Google Principal Engineer)

"Now a bit of personal history. The Go project was started, by Rob, Robert, and Ken, as a bottom-up project. I joined the project some 9 months later, on my own initiative, against my manager's preference. There was no mandate or suggestion from Google management or executives that Google should develop a programming language. For many years, including well after the open source release, I doubt any Google executives had more than a vague awareness of the existence of Go (I recall a time when Google's SVP of Engineering saw some of us in the cafeteria and congratulated us on a release; this was surprising since we hadn't released anything recently, and it soon came up that he thought we were working on the Dart language, not the Go language.)"

https://groups.google.com/g/golang-nuts/c/6dKNSN0M_kg/m/EUzc...

[+] jjgreen|2 years ago|reply
Go puzzles me. It's slower than C/C++/Rust and GCed, so not really suited for performance critical stuff. No OO so not really suited for larger complex applications. So for smaller not-performance-critical programs, why not Python, Typescript etc? It seems that its popularity exceeds its scope, or am I missing something?
[+] vcryan|2 years ago|reply
Not seeing how OO makes a language more suited for complex use cases. If you said OO approaches add complexity to any use case, I would agree to that.
[+] vimsee|2 years ago|reply
Why does it need to be the best in one single metric when it can be great in many?

It is an order of magnitude faster than Python. So it is well suited for performance in many cases.

It is a lot easier to pick up than C/C++. So it is well suited for smaller programs.

I can see Go as a very good middle-ground.

[+] rplnt|2 years ago|reply
It's fast enough for most applications. Python and Typescript are unmaintanable. Everything around them breaks as the time goes by. I'd argue Python is not suitable for anything that spans more than one file or one week. I don't have enough experience wtih Typescript to hate it as much, but I know I spend most of my time fighting with the tooling. Again, unless you are writing a fresh application that is fine to throw away after a year, Typescript is not it.

Go excels in that it is so simple. As the saying goes, you mostly read code, not write it. Go is very easy to understand and review. Which is what you do mostly when working on complex systems in teams. It's extremely easy (and fast) to build and deploy unlike the languages above. That's why companies use go. Not for personal projects, not for drivers, and also probably not for corporate monoliths that require a suit and a tie to contribute.

[+] Cwizard|2 years ago|reply
It compiles down to a single binary and is relatively easy to write. I think that is the reason it is such a popular language for CLI tools.

You will never have an issue with missing dependencies or outdated runtime.

[+] dontlaugh|2 years ago|reply
OOP is generally a bad idea, so lacking it is not a downside.

The bigger problem is the weak and inexpressive type system, which is no better for C or Python.

[+] madeofpalk|2 years ago|reply
And still has null pointer exceptions. I could see a role for it in between like rust and python if it had a sane type system.
[+] usrbinbash|2 years ago|reply
> so not really suited for performance critical stuff.

What "stuff" is that exactly? Because Go is designed primarily for backend services and microservices. Considering how much backend software is powered by Python, Java, or *retching sounds* PHP, I highly doubt that is a major consideration in that area.

And even when performance actually does matter to an extend where it becomes a more pressing issue than network latency, Go code performs incredibly well and is more than a match for most requirements.

> No OO

How do you figure? I can write in a completely object oriented style in Go. Also, OO is not a prerequisite for large complex systems, and quite often strict adherence to it can make code much harder to maintain than it needs to be. Maintaining large complex systems requires, first and foremost, code that is easy to grok and maintain. And regarding that particular area, Go runs circles around any major contemporary language, including Python.

> It seems that its popularity exceeds its scope

Considering how widespread it is by now, I highly doubt that.

[+] amelius|2 years ago|reply
The same can be said about Rust: its popularity exceeds its scope, because 99% of applications I see that are written in Rust are better off written in a GCed language.
[+] ryandvm|2 years ago|reply
Go is:

* Easier/safer than C

* Less dangerous than Javascript (statically typed and a good standard library)

* Much faster than Python

I think it's an excellent middle ground, compromise language. It's the centrist candidate of programming languages. Not the best at anything, but on average better than most.

[+] conor-|2 years ago|reply
> So for smaller not-performance-critical programs, why not Python, Typescript etc?

I can compile my go application down to a single, static binary that can run in a distroless container. The packaging/deployment simplicity of Golang appeals to me much more than Python, TypeScript, etc.

Also the developer tooling is first class and sustained backwards compatibility is top-notch. I can pretty much always upgrade the version of Go 1.x I target and have 0 worries in the world. Meanwhile in Python and JS land, the dependency management problems are a nightmare.

[+] lm28469|2 years ago|reply
It's really nice to use though, I never liked python and its environment, coming from C go feels like home to me, it's simple and it just works. I never had headaches to setup and run things like I had with python and js.

Performance is good enough for most jobs, we're not all working on the bleeding edge, a lot of jobs are more akin to code monkeying basic CRUD

[+] mauvia|2 years ago|reply
IME people recommended it for being more batteries-included in terms of webservice stuff and some multithreading/scaling stuff, as well as having multiplatform support and libraries being compiled into the executable.

The language also seems to be built for the kind of people who think C has no downsides and everyone should write everything as explicitly as possible, which are an audience that normally doesn't get aimed at.

[+] pjmlp|2 years ago|reply
Docker (originally written in Java until Go advocates took over), and k8s are what made it popular.

Now it is kind of unavoidable in DevOps space for some cenarios.

My only complaint is their approach to language design.

Inferno with Limbo, Android, Windows Phone, show that there is GC hate, and shipping products to millions of users.

[+] bitshiftfaced|2 years ago|reply
> No OO

Are you referring to Object Oriented programming? And if so, why not?

[+] Fire-Dragon-DoL|2 years ago|reply
You just cited C, how's not having oop a requirement for big apps?

Also, unless inheritance is what you mean by oop, it supports the other usecases of oop

[+] ecmascript|2 years ago|reply
I don't use Go since it's from Google but I wouldn't say that Go / Java can't be used for performance critical stuff?

There are a lot of values that goes into "performance critical stuff". For me, it can mean a chat app / money transfers etc that is performance critical but is is of course not as critical as in flight software or other system control software where GC could mean deaths.

[+] k__|2 years ago|reply
K8s is it's lifeline.
[+] usrnm|2 years ago|reply
Go is basically a very specialized language for writing small network services that are supposed to run on Linux. If this isn't your use case, then don't use go, but if it is, then golang is nice. Mostly the runtime and tools, not the language itself, though
[+] fifilura|2 years ago|reply
I am not a functional programming fanatic, but I do appreciate all the functional constructs making their way into less esoteric languages. Such as map/reduce and in general working with immutables.

Golang does not have this and it makes me feel like programming with only one hand. In particular when working with data and aggregations.

I am prepared to be corrected, I have only looked briefly at golang, so I am happy to give golang proponents a chance to shine!

[+] allyjweir|2 years ago|reply
I felt very similar when I started working in Go last year. Coming even from languages like Typescript and Python which are most definitely _not_ functional but do have some of the niceties like map/filter/reduce, I was missing it a lot in Go.

What I also found was that there was a whole class of errors that I hadn't seen in years due to mutable state and poorly written for loops/ranges when compared to map/filter/reduce usage.

We introduced `samber/lo`[1] which provides a lodash-like library, generics compatible, to Go. This has been a big step-up and has improved my experience with writing Go immeasurably.

My colleagues now (kindly) joke every time they see a PR from me that includes a lot of samber/lo usage that I'm slowly replacing every for loop I encounter.

[1]: https://github.com/samber/lo

[+] Someone|2 years ago|reply
They don’t mention go in that list of languages that now can be compiled for the browser because go already has a wasm backend (GOARCH=wasm)
[+] thiht|2 years ago|reply
There are the languages people shit on, and the languages nobody use.

Go is far from perfect, but I’m productive with it, it’s expressive enough that it’s both easy to write AND read, it’s performant enough, easy to build and deploy, and most importantly, it gets shit done. I don’t need more, but the Go team still delivers great updates every 6 months or so.

[+] usrbinbash|2 years ago|reply
[+] altun|2 years ago|reply
You are right. But until last weekend, it continued to appear. It currently does not appear in queries made within Germany.
[+] Luker88|2 years ago|reply
IMHO the hate comes from golang looking more like a better python than a better C.

Onboarding of new people is extremely fast, but lack of features will result in seniors hitting a wall on what they can do and guarantee with the language.

While go tooling great, you still have to test for most of the edge cases that C and python have: nullpointers, lack of proper enums/typesafety. This is commonly reflected in the tests that have to check for lots of trivial things.

Rust is much more difficult to learn, but the amount of things you need to test is drastically reduced, and seniors appreciate that.

What we see in our company is that juniors will find go wonderful, seniors dream of switching to Rust.

The hate probably comes from high expectations (especially coming from python/C), followed by hitting a feature wall due to how opinionated (and slow to adopt new features) golang is.

[+] elp|2 years ago|reply
Go is a lot closer in target market to Python than C and I can take a mostly competent python programmer and get them to a mostly competent Go programmer fairly quickly. Rust is all very wonderful but it's too hard for juniors to become productive in any reasonable time frame.

Go might be type unsafe compared to Rust but its staggeringly more type safe than any of the interpreted languages. Then you also have about the same speed of Java with instant startups and no memory bloat as a general purpose backed language its great.

I would sell my first born to get the ? operator for error handling that Rust has though. The "if err!= nil" stuff bugs the hell out of me.

[+] favadi|2 years ago|reply
> When you search "golang" on google for a long time, the question "Why people hate Go?" comes up at the top.

I don't see this article in the first page when searching for golang. Maybe the results is personalized based on your search history?

> Why people in Google hate Go?

I really doubt that. Most developers I know, that worked with Go for a while, love it for its simplicity and tooling.

[+] gniv|2 years ago|reply
> When you search "golang" on google for a long time, the question "Why people hate Go?" comes up at the top.

What does this mean? Where do you see this? Also, I don't believe that question comes up verbatim, since it's not grammatically correct.

[+] altun|2 years ago|reply
Previously, golang sub reddit came to the top in golang searches. The first title on the subreddit was "Why people hate Go?" was the title. Now go.dev comes first and reddit is below without title.

When you search reddit golang, the title continues to come first.

[+] edimoldovan|2 years ago|reply
It has a richest std lib with quite good performance which makes it suitable for a lot of use cases where one wants to reduce dependency. I also find it quite easy to learn. Personally use for all web products I build as I have gotten the hang of it and have a small sort of framework to build products quickly with. And I get to ship a single binary to production.
[+] ksec|2 years ago|reply
I dont think people in Google hate Go. But I have heard multiple times people in Google hate Ruby.
[+] sebastianconcpt|2 years ago|reply
Well, putting aside arguments based purely on money, what's the fundamental "edge" that Go gives you as an engineer betting you career long term on it that isn't better used in some alternative?
[+] pushingice|2 years ago|reply
When I was there the only complaint I heard was the golang exceptions to the style guide. In no other language would you be allowed to name a variable a single letter like "r" for example.
[+] izacus|2 years ago|reply
"Hate"? What do you mean by "hate"?
[+] andrewstuart|2 years ago|reply
There’s still no ideal language.

Closest seems something like Zig but it doesn’t seem to be getting much velocity.

I really wish TypeScript had an official native code compiler. It did have one but only for microcontrollers and I’m not sure even that still exists.