3 ms·
Erlang isn't necessarily better than Go in this regard. Since Erlang is interpreted and everything has to copied between processes, Go is bound to be faster tha
by Skinney 10y ago
Erlang isn't necessarily better than Go in this regard. Since Erlang is interpreted and everything has to copied between processes, Go is bound to be faster than Erlang, especially when it comes to parallelism. Go is also statically typed, which in my experience makes it easier to avoid bugs in large teams.
Erlang, however, is much better at distributed concurrency. There are few who suits this use case better.
As in all cases. Use the best tool for the job.
- ramchip 10y agoErlang is actually compiled, and binaries above a certain size are reference-counted rather than copied between processes. It still makes various compromises like using bignums and doing preemptive scheduling which make it slower in general.
- Skinney 10y agoIt's compiled to erlang bytecode, yes, but not to machine code. You do have the option of doing that, but I do believe you miss out on live updates? Not sure. Erlang is great though, especially Elixir, but for some use cases Go is better.
- wyager 10y agoIf the first paragraph is the extent of your concerns with Erlang (which are reasonable), they are more than addressed by Haskell. Compiled and very statically typed.
- Skinney 10y agoYeah, but it's more difficult to teach others Haskell (what's a monad?) than Go. I know all three languages, I mostly prefer Go for backend work because it's easier for others to join in on. Point is that they all have their strengths, but one is not necessarily better than the other. As with all things digital, it depends.