this post was submitted on 30 Apr 2022
47 points (98.0% liked)
General Programming Discussion
7709 readers
4 users here now
A general programming discussion community.
Rules:
- Be civil.
- Please start discussions that spark conversation
Other communities
Systems
Functional Programming
Also related
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Go is flawed but so are all the programming languages I've ever used. The author raises some valid criticisms imo but I'm not sure what the point is supposed to be. Go is good for some use-cases and not for others
Which use cases is it good for, and which use cases is it not good for?
Golang is good for quick prototyping of networked application. As the author says, the golang coroutine runtime is really cool to handle many coroutines/channels. In my experience, the rest of the language is in my view garbage (no offense meant):
pub fn...
)If you need to quickly hack some software, i personally would say modern PHP or python is a better choice because it's certainly easier to write/debug (especially with type annotations). If you need higher performance from your quick and dirty script, golang is an acceptable choice.
If you need a reliable piece of software that can be hacked on by other people, you can certainly do it in golang if you have a whole team that's really knowledgeable about golang and can setup tooling/conventions around it to account for every missing piece of the ecosystem. Otherwise, i would personally recommend Rust for most projects nowadays.
Rust as a language is fantastic, but the ecosystem and tooling is even better. I've been programming on and off for the past two decades or so, but Rust is the only language for me that made it a pleasure to read code and write code because everything is explicit (even though sometimes a little cumbersome due to being correct, for example the difference between String/OsString in regards to system paths PathBuf). I'm happy to detail on the reasons why if you're interested.
(Rust is not the only capable opinionated language: i would recommend to look at Erlang or OCaml for other examples of truly powerful/expressive languages)