4 ms·
Superficially they're very different. But lots of people use Go because its a "first class" concurrency language. Concurrency was given a huge consideration i
by bcrosby95 6y ago
Superficially they're very different. But lots of people use Go because its a "first class" concurrency language. Concurrency was given a huge consideration in Clojure too, with its immutability, STM, agents, etc. The reasons you might choose Go can overlap heavily with why you might choose Clojure, Erlang, or Elixir.
- vips7L 6y agoIs it really first class though? Anything CPU bound is basically a noop since GO doesn't have actual threads.
- bcrosby95 6y agoGo automatically multiplexes goroutines on top of OS threads. You can peg all the cores of a multicore CPU in a single Go program using goroutines. Edit: last I looked you could see how many OS threads would be used by looking at runtime.GOMAXPROCS. There was a time when it would just default to 1, but it looks like they changed it. When I last programmed in Go you had to override it via an environment variable or set it in code.