3 ms·
I am quite excited about this project. When I was looking at Erlang the syntax totally turned me off, but the rest of it is awesome.
by vvpan 14y ago
I am quite excited about this project. When I was looking at Erlang the syntax totally turned me off, but the rest of it is awesome.
- ericmoritz 14y agoWhat didn't you like about it? I remember hating the syntax when I first start but forgot why. After I worked through the initial aversion, the syntax no longer feels worse than say, Python, it is just different. In fact, I wouldn't give up Erlang's pattern matching functionality for anything and I miss that feature in any other language I use.
- lucian1900 14y agoThe one thing that really bothers me about its syntax is all the different line terminators. It makes moving around patterns painful. I sort of dislike other aspects too, but nowhere near as much.
- derefr 14y agoIf you're talking about the comma-semicolon-period thing, it seemed strange and foreign to me as well--until I realized that , and ; are just && and || with different reactions under unification. Basically, Erlang's grammar is defined such that any expression works with all the spaces stripped out--so it has to have some other way to encode things that would normally use the juxtaposition or line-separatation "operators" of other languages, in a more explicit way. Erlang's case statement, for example--and by extension its multiple-function-definition-under-pattern-matching--is basically one long ternary operator chain: (a?b:(c?d:(e?f:g))), and so forth.