|
|
|
|
|
by derefr
5137 days ago
|
|
If 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. |
|