3 ms·
The syntax is unfamiliar to you, which is why you found it confusing. In reality Erlang syntax is very simple and consistent, here you have most of it: http://e
by klibertp 12y ago
The syntax is unfamiliar to you, which is why you found it confusing. In reality Erlang syntax is very simple and consistent, here you have most of it: http://erlang.org/doc/reference_manual/expressions.html http://erlang.org/doc/reference_manual/expressions.html
I don't understand people who refuse to learn unfamiliar syntaxes at all. A syntax is only bad if it matches semantics poorly, for example in JavaScript you create functions very often, for various purposes, yet syntax for this is rather verbose, which may hurt readability by obscuring what's really going on. In case of Erlang the syntax supports the semantics quite well. For example, sending async messages between processes is central part of the language and accordingly has lightweight syntax, essentially: "Target ! SomeMessage". It's also highly consistent, for example guard patterns in functions have exactly the same syntax as guards in "if" expressions; destructuring has the same syntax no matter where it's done, in funcion definition, case statement or inline with "=" operator. And so on.
In general you should try to understand the syntax and underlying semantics before saying anything about it.