|
Disclaimer: I wrote mostly Java for 10 years, and Go for about 5. Go straddles an interesting space. Currently I work on a back-end data crunching software, distributed (running on hundreds or sometimes thousands of nodes), each node running 64 or 128 cores with 128 or 256GB RAM. The problem we solve is both IO, CPU, and memory bound. Anyway to look at it, it's a hard problem. The old version of this program was written in C. Then it was rewritten in Go. The people who decided to switch to Go was looking for the following features:
- Be able to manually lay out memory for performance. So not Java.
- Mmap binding to file system, for performance.
- More abstractions than C, for adding software features.
- Cross platform. The program sometimes runs on Android and IOs.
- Easy to learn for beginners. It's not possible to only hire PhDs or C++ gurus. - Easy to dig down into assembly, for performance.
- GC doesn't get in the way, for performance as well as adding features. Maybe these days, C# might work? May Rust? But 6-8 years ago, Go fit the bill and it worked out very well. And the language doesn't feel "limited" in any way. Yeah, I miss generics sometimes. Maybe error handling could be better? Sometimes I need to work around the GC. But day-to-day, I think I focus more on solving actual problems (performance bottlenecks, adding features), instead of pondering if I need to create another AbstractFactory, or tuning GC knobs, or figuring out which pointer type to use. To me, Go feels very balanced. I can write python or Java like code and get decent performance. If I need more performance, I can dig down pretty deep make CPU work faster. The abstractions are light enough that a new person can figure out what's going on and add features, fix bugs, or improve performance. I like Go. |