1

I am new to Elixir, even new to functional programming. I know python and Java. I use them for my data-science project. Is it necessary to understand Erlang VM to learn Elixir? If yes then how I can understand Erlang VM ?

If there is a guideline to follow to learn Elixir, it will be very beneficial for people like me.

Peer Stritzinger
  • 8,232
  • 2
  • 30
  • 43
pd farhad
  • 6,352
  • 2
  • 28
  • 47

2 Answers2

3

The most important thing to know about the Erlang VM is the process model, which is the same in Erlang and Elixir. There is a page about it in the documentation, and here is a blog post with some practical examples.

The process model also influences how garbage collection is done; this differs from how it works in other languages. This question goes into some detail, but the most important point is that processes do garbage collection independently, based on the memory usage of the process itself. If you want to understand how this works under the hood, nothing beats this blog post.

Community
  • 1
  • 1
legoscia
  • 39,593
  • 22
  • 116
  • 167
0

It probably isn't necessary to understand the erlang syntax outside of how to call erlang functions in elixir. Its fun to learn erlang(the language) but the more important part to understand are the things about the BEAM (the erlang/elixir VM) like..

The Actor Model https://www.youtube.com/watch?v=7erJ1DV_Tlo which will be an intro understanding to the next point..

Processes, Supervisors & Workers http://learnyousomeerlang.com/building-applications-with-otp

  • learn things like the "let it crash mantra" how that changes why you don't hardly ever see (and shouldn't rely on) try/catches in elixir.

  • immutable data

  • ets tables and other types of storage that the BEAM provides by default.

  • how to spin up/use processes

  • clustering

These are some of the things that the VM gives you. And some of the architecture that make the patterns you will see in elixir different then many other languages.

jrichocean
  • 31
  • 4