Hi all,
let f x = x + 1 in
f -1
is not valid in OCaml.
I'm just wondering why this issue is still not addressed in the parser? For example, F# parses "f -1" as unary negation, but "f - 1" and "f-1" as binary operator. It looks a bit tricky (as whitespace is taken into account), but feels so natural when writing code.
Is there any reason we can't have the same in OCaml?
PS. I understand that it may break existing code, but it should be solvable by a compiler option similar to -safe-string etc.
Thank you