Will Learning Erlang help in Learning ELixir and Phoenix?

Lua has optional semi-colons between statements. They are not needed but can help catch some difficult to spot syntax “errors”. One is for example the creation and initialisation of multiple variables in one statement:

local a,b,c = foo(),bar(),baz()

However if I forget a comma I can get legal statements which give me strange results:

local a,b,c = foo(),bar() baz()
local a,b c = foo(),bar(),baz()

So I prefer being liberal and adding semi-colons often. A few extra characters are worth it. I would do the same in JS if I was to write it.

Sorry, wandering off topic here :smile:

1 Like