2 ms·
A lot of the choices for Go become clearer when you realize it was primarily built to solve problems of servers and code base at scale. It supports millions of
by sfifs 10y ago
A lot of the choices for Go become clearer when you realize it was primarily built to solve problems of servers and code base at scale.
It supports millions of co-routines, not threads. There's typically one thread per CPU or so. The key insight is a lot of server type workloads primarily are constrained on I/O and multiplexing virtually unlimited co-routines on a thread automatically by the runtime makes for much simpler concurrent server code.
Implementing high concurrency server code in almost any other mainstream language is non-trivial. Indeed I originally switched from Python to Go primarily because of that.