|
|
|
|
|
by rdtsc
4893 days ago
|
|
> I was always scratching my head over why this place needs a period and that place doesn’t I like Fred Hebert's (author of http://learnyousomeerlang.com/) explanation of syntax on his blog: http://ferd.ca/on-erlang-s-syntax.html At least the "template" explanation is most helpful to me. > then there was just plain weird stuff like one-based indexes. Interestingly, I don't think indexing is really that common in idiomatic Erlang. In other words when processing lists, one can split them into head and tail [H|T] or uses folds and maps. |
|
So far, I agree with the note about 0/1-based indexing. It's just not used a lot. However, I find it pretty calming that indexes will work the way I expect them to, should I ever need to use them.
Now that I think about it, these two points (syntax and indexes) are somewhat petty things to point out about the Erlang : Elixir relationship, and I feel a bit bad for repeating them in the blog post. Things like protocols are way more interesting (and hopefully, are what drives you to try out Elixir). (-: