I still don't think Go is a good language. I had notable experience at Google and the following things constantly bugged me:<p>- It was very difficult to read. When trying to review the code every detail was left out. While each line was simple it was hard to actually get the high-level picture of what code was doing.<p>- Very error prone. Maybe it isn't C dangerous but "defaults are useful" is the breeding ground of bugs. The number of outages we had due to trivial Go bugs was embarrassing and time consuming.<p>- Some simple things are just too hard. Most of these boil down to lack of generics. For example inserting an element into an array needs multiple lines of code.<p>- Many common functions and buitins have very questionable decisions that are huge footguns. Especially the fmt library. (It tries its absolute hardest not to fail. Instead it just outputs garbage and "succeeds")<p>I get that it is easy to write, and that each line of code is simple. However I think they went way too far.<p>I see Go as a slightly higher level C. You get better package management, memory management and interfaces. However C is still way too basic for my preferences.<p>It is a weird spot though. It is sitting in about 2x C performance. It is unclear what to recommend in that spot as many languages are significantly slower. Rust is probably roughly as productive, but much harder to learn. Most of the interpreted languages are significantly slower.<p>There are some JVM languages that are better and have similar performance. However there is a memory and startup overhead. However I think they make more sense in the end. JavaScript is also a pretty good choice. It is in roughly the same performance realm but much more productive I think. (Especially TypeScript).
I'm not looking for a job, but I'm often invited to chat with a company's dev team, and I get a chance to see what they are doing and how they are doing it. The last company I visited was a handful of Physics Ph.D.s. They were writing control software.<p>Obviously, this team was <i>really</i> smart, but they were not high power software developers. They weren't ex-kernel developers and they didn't write 3D game engines in their spare time. They were just really smart guys that knew how to program.<p>They were using go, and I felt like that was a great choice for them. Fast enough performance, comfortable development, and easy enough to understand. This is what I really like about go.<p>Languages like Haskell and Common Lisp are popular topics here on HN, but they'd be poor choices for a startup made up of domain experts that aren't CS-majors. I'm sure these guys could have learned Rust or even modern C++, but with go they could get started in a language that wouldn't take a year of experience to use correctly.<p>For my many little personal projects, I like python, but for team projects were there will be a mix of abilities go seems like a good choice.
Great article. I would say my two minor disagreements is that go's fast compilation is not... Typically used for tests, in my opinion the testing discipline in go is low. I would go so far to say that go is neither "a better c++" nor "a better c" but rather "a better python".
Go is good because it’s easy to read and pickup, and it compiles really fast. I would say it’s good for request based services but I don’t think it’s as good as it can be for enterprise code. What I miss most is the lack of sum types to limit state space, which is very useful in business logic.
Go is much easier to learn and get up and running compared to Rust in my experience. It's great for writing servers and multi-threaded applications. Rust can be used to optimize but you'll probably get a lot of mileage out of golang before having to switch.
The other day I read an article about which language C programmers should use, and how Go is better thought of than Rust but that in the end his suggestion is to go for C++ [0].<p>Interesting observation was that the Rust community had more fanatic followers who believe in Rust and nothing else, whereas the Go community was more relaxed about it.<p>That makes me wonder: if something had been written in Rust, would a Go, Python, or C++ developer ask why not in their language? Or would they just not care?<p>[0] <a href="https://berthub.eu/articles/posts/cpp-rust-go/" rel="nofollow">https://berthub.eu/articles/posts/cpp-rust-go/</a>
"Go is simple" is the main one and only reason I love Go.<p>I learned Rust in my spare time, and it took me months to get to the point where I could write anything useful at all. I never did feel like I knew the language. I just don't have the spare time and energy to put in such a monumental effort into learning a language. After 2 weeks of Go I knew nearly all the ins and outs of the language. Once you add in sophisticated and strict linting from golangci-lint you just can't go wrong. Code reviews are a breeze and understanding code is a breeze.
To me Go is competing with JavaScript, not Rust. If you're considering writing a CRUD app in Node.js, you can do it in Go, and it'll be equally easy, and maybe run faster.<p>But if you're writing a driver, codec, kernel, firmware, or even a library that's supposed to be usable with more than one language, Go is just not a good fit.
> Let’s avoid tying our identity to a single language and embrace practicality first and foremost.<p>This is very poignant.<p>I feel like there a part of us that is attached to a certain language/framework, and we intentionally wear a blindfold to avoid seeing other solutions that are more practical.
That fact that we need to prepare in advance to defend learning a new-ish language and then using to build something interesting or useful is a depressing.<p>Oh well, the PM will make you re-write it in that k8s thingy anyway, because everyone else has it.
Well, if you have an unexplained hatred for typing double colons five times per line of code, as I do, Go allows you to not do that.<p>Rust::Forces::Them<Colons>::Everywhere::AllTheTime();
All the things 'hn_asker' said plus a giant ecosystem, huge developer attention, amazing tooling, outstanding support for parallelism, jobs, a good pool of enterprise-grade projects (CockroachDB, all the thinks from HashiCorp, K8S, Docker, etc).<p>And Gophers!