4 ms·
Anything specific you liked about Elixir more than Go?
by Xeoncross 9y ago
Anything specific you liked about Elixir more than Go?
- tsukaisute 9y agoAs someone who writes both, it's even difficult to compare these as they are apples and oranges. Elixir (due to Erlang base) is great for long-running or distributed services and includes tooling to, for example, easily introspect the state/memory usage of your services down to a single mutable data structure, to heal from failures, and to hot-swap upgrade/code while the server is still running, and to perform node-to-node RPC. Go would be a replacement for something that was previously written in C/C++, that may need concurrency, and that should compile to native code. You get very fine-grained control of everything from network to file operations and excellent concurrency constructs. A web crawler, a device driver, or writing an Nginx/HAProxy-type daemon, all may be great example use cases. One could write their next social network/app backend using Go (just as one could do it in C), but it would probably take more work than just using a higher-level language.
- oregontechninja 9y agoGo is much more suited for web apps than any driver or real time performance application; although, I will agree that using Go for command-line tools is great. I haven't used Elixir but as somebody who uses Go, I highly recommend not replacing C/C++ with it unless it isn't performance critical. PS: Go's memory usage is pretty up there some times, another reason you should probably stick with C/C++ in the context mentioned above.
- teilo 9y agoI'm the wrong person to answer that, perhaps, but with OTP you get a task broker / monitor for free. With Go we would be back to piecing together a system using other tools such as AMPQ or similar. It also isn't as easy to write it for high-concurrency monitored tasks. But I have little experience with Go, so correct me if I am wrong.