Live data from Hacker News

Why people in Google hate Go?

news.ycombinator.com

51–60 of 144 posts

Re: Why people in Google hate Go?

#51
post #20

Earlier quoted context omitted.

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.

I meant speed-critical by that, sorry if that was unclear. I see opinions like "1/3 the speed of C" bandied around, not bad but means a big model run takes three days rather than one.

Are weapon targeting systems and battleships speed critical enough?

https://www.ptc.com/en/products/developer-tools/perc

Re: Why people in Google hate Go?

#52

Earlier quoted context omitted.

Can you give an example of 'shitty code'? We've got murmurs of Go being adopted by some teams so if you have first hand experience it'd be really useful

Single letter variables. A terrible pattern the go community picks up.

I have never seen this done in enterprise Go code, and I don't think it's been strongly recommended since the mid 2010's?

For small functions where you can see everything in a single page, this is fine. Though I think they should always be avoided except the most common cases (`i` for index) because keeping a codebase grep-able is a high priority. Using constant, verbose variable names can make tracing through a codebase much easier.

Re: Why people in Google hate Go?

#53
post #4

Go isn't a serious language for large systems. The language allows writing shitty code and the community has largely adopted that. Go fanatics will hate this, but you simply can't compare it with the ability to write and maintain in languages like Java.

Java also has null and overall a weak type system. They're pretty close in that respect, actually.

From the point of view from Go folks, we need a PhD for mastering Java's type system.

Re: Why people in Google hate Go?

#54
post #11
post #5

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?

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.

I went from Erlang to Rust and frankly I would not say Erlang is more productive, despite being a very high level language. When building a non-trivial system one should think about total cost of ownership.

A Rust program is by default going to be CPU and memory efficient. It is not likely to negatively surprise you in production with weird bottlenecks and unexpected behavior.

The time invested in producing a solution which is statically typed, pays of in spades when it is time to refactor or change something (which is pretty damn often if it is your product). Refactoring a Python/Erlang/Elixir/C/PHP solution is a major PITA and fraught with new bugs.

The time spent optimizing solutions in high level languages when they are falling on their face in production is generally ignored and extremely common. You do not have to be github to face performance problems in Ruby.

Re: Why people in Google hate Go?

#55
> 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.

Re: Why people in Google hate Go?

#56
post #11
post #5

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?

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.

Except when you actually enjoy things being fast. For example, HTTPie easily adds 0.5-1s delay to every request because it's written in Python, especially on the first invocation. xh (https://github.com/ducaale/xh), on the other hand, starts immediately because it's written in Rust. I very much like this trend.

Re: Why people in Google hate Go?

#57
post #11

Earlier quoted context omitted.

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.

Except when you suddenly do need performance and predictable latency but all your software is written in python. Its always funny how these performance requirements just creep up on you like that.

Yeah what we really need is a GCed language that allows you to implement parts in no-GC mode. And ideally where you can iteratively migrate GCed parts to no-GC parts when required.

Anyway, Python is not a good comparison, as performance is not one of its main qualities.

Re: Why people in Google hate Go?

#58

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…

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

Re: Why people in Google hate Go?

#59
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.

Re: Why people in Google hate Go?

#60
post #5

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?

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

Post reply on HN