- cross-posted to:
- programming@lemmy.ml
- cross-posted to:
- programming@lemmy.ml
I honestly don’t understand the hype around golang. Can anyone ELI5? (longtime C++ and Python user, now doing Rust)
Go was designed with simpleness in mind. C++ and Java were already really complex in 2009 when Google started the development of Go. For example, Go has fewer keywords than C and is easy to learn in about an afternoon.
The second point is compilation time. C and C++ (and Java) have quite slow compilers which slows down the development process of large projects significantly. Go sacrifices some runtime performance in exchange for a very fast development cycle.
Third, Go introduced a very easy-to-use concurrency system. Goroutines (and channels as main communication method) are really good for writing asynchronous code (e.g. doing a lot of I/O or networking).
And fourth, Go has a comprehensive standard library that also includes an HTTP server/client, a template engine, a database wrapper, out-of-the-box support for common serialization formats, compression algorithms, cryptography and more (see yourself).
It’s somewhat like the best of C++ and Python combined—easy to learn/use, batteries included (and if not, there is almost always a lib for your problem) while still being fast and efficient.