|
|
|
|
|
by namelezz
3731 days ago
|
|
Sometime I wonder why Elixir tries too hard to have Ruby syntax. Erlang: loop_through([H|T]) -> io:format('~p~n', [H]),
loop_through(T);
loop_through([]) -> ok.
It seems convenient to use ';' to separate multiple definitions of a function compared to using 'end' in Elixir(function definition continues in the next block)Elixir: def loop_through([h|t]) do IO.inspect h
loop_through t
enddef loop_through([]) do :ok
end |
|
Erlang's syntax may be more efficient, but a lot of people won't touch it becuase the syntax is unfamiliar. Elixir has a huge advantage in this. It might not matter to you specifically, but in the realm of adoption that is huge.
And honestly I really enjoy the syntax...