#elixir#go#big-picture
Elixir vs Go - Big Picture

Elixir vs Go - Big Picture

Compared to Elixir (three years experience) I have only about a year of experience with Go. Still, I spot a few things to take into account when working with either of them.

Elixir is a functional language designed for building scalable and maintainable applications. It was released in 2012 and is based on the Erlang VM.

Go is a statically typed, compiled language (syntactically similar to C). It was created at Google to improve their workflows and its first release was 2012 too.

Learning curve

The learning curve always depends on the background of the one learning.

If you came from Object Oriented programming languages, the learning curve for Elixir might be steep but not for Go. But for someone coming from any other functional programming language (or some interpreted languages like Ruby), the learning curve for Elixir might be shallower. Go is simpler and therefore easier to learn.

Suffice to say, this is a subjective point of view but something to take into account depending on the premises.

Ecosystem

Elixir

Elixir uses Hex as package manager for the Erlang ecosystem, which is such a joy, same as their documentation Hexdocs (that has a modern appearance, check the string docs out). As I mentioned before, Elixir is based on the Erlang VM, which means that you can invoke any Erlang function with no runtime cost. You just need to call an Erlang function preceded by a colon (:). For instance: :crypto.hash(:md5, "Crypto from Erlang")

It counts with awesome frameworks like Phoenix (please don’t miss how they build interactive web applications with live view) or Plug. Elixir ecosystem is a dream come true, except maybe for working with databases. The database wrapper and query generator for Elixir is called Ecto and it feels a little old school, in a sense that when you need to write complex queries, you end up having to write raw SQL code.

Go

Go modules is the official way to manage package dependencies but sometimes can be difficult to handle (before having go modules, it was even worse to deal with dependencies in Go).

After working with Elixir, Go’s documentation felt little like going back in time, because of its muted colours and long paragraphs. For example, check the string docs out. Apart from that, finding the documentation in Go can be time consuming when starting as it’s not all in one central location. But on the other hand, there are infinite resources of all kinds available in Go (packages, learning tutorials, etc) in comparison to Elixir.

Go also counts with awesome frameworks like Gin, that allows you to build high-performing REST APIs. But the language is so simple that you can even write APIs only with a few lines of code, just using built-in libraries.

Community

Elixir has a very active Forum where people will answer any question and I found it really helpful at any time.

Stackoverflow doesn’t have as many entries of Elixir (~8.000) as Golang (~51.000). Elixir’s community is not as big as the Go’s one, but people there are incredibly friendly and welcoming.

In Go, whatever library you are looking for, might already exist (even more than once) on Github.


If you like this content, in the next part I'll tell you more about the developer experience. Stay tuned.