Re:Building a Reddit-like site after 3-4 months learning Elixir
by oregontechninja on Monday May 22, 2017 @12:23PM
(#14394846)
Go 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.
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.