|
|
|
|
|
by ufo
2860 days ago
|
|
As a big Ocaml fan, the syntax is one of my least favourite aspects of the language. Two things that I find particularly annoying are constructors (which don't have the same syntax as funciton calls) and the multitude of shift-reduce ambiguities that don't do the thing that you want. For example, in the following code the W gets parsed as part of the inner match: match foo with
| X -> match bar with
| Y -> 1
| Z -> 2
| W -> 3
A lot of this could be remedied by having more expression terminators. ReasonML uses C-like curly braces but even a simple "end" token to close the match expressoin (similar to what Lua does) would already be enough. |
|