3 ms·
Having used both, I think Go has better performance and due to its static typing you can reason about functions since their parameters are explicit. This scales
by sethammons 3y ago
Having used both, I think Go has better performance and due to its static typing you can reason about functions since their parameters are explicit. This scales better as the org grows. Elixir lets you define a spec but it is not enough. I routinely had to go several callsites up the stack ti understand the parameters. However, I heard static types are on their way and that is huge.
Elixir has GenServer and BEAM niceties which is something you'll have to replicate, likely poorly, in another environment.
As for learnability, meh. Have a senior on staff and new employees will be able to learn either.
Elixir has Phoenix, liveview, and Ecto. You'll just have to look into them, but they are good. The game changer is iex, you can terminal into any running process in the cluster and interact with it.
For me, I'm much more experienced in Go and would leverage managed kubernetes if I needed to cluster. I think it scales better for larger orgs. If it is a core group of one small team, Elixir is pretty rad.
- ak_111 3y agoThanks, this covers all the angles quite well. What would be the closest equivalent to Phoenix/liveview for Go (as in best django-like stack).
- sethammons 3y agoNothing really; and nobody has a thing like liveview that I'm aware of. For Go, I use a request router (chi) and some helper packages for mundane things like reading env configs. I write the backend as an http api and then have a separate frontend, currently learning svelte for that. Go is very batteries included.
- icedchai 3y agoI recently started learning Elixir and find it super interesting (along with Erlang.) The paradigm is so different. Mostly I am looking at it for hobby projects. It reminds me a bit of OpenVMS, where the OS had built in clustering facilities, processes had mailboxes, etc. I've done a bit of Go in the past and it definitely has its place, too. It feels more mainstream. We converted a Python app to Go a few jobs back and the performance increase was incredible.