What would be the corresponding SML? I see how the way SML binds ';' would help here, but would it change anything about the last two badly indented matching? And it seems to provide you with the equivalent footgun if you attempt to do multiple side-effect operations in a match branch, which in my experience you want to do more often than you need to separate matches with ';'.
[deleted]
Not in my version of OCaml (OCamlWinPlus v1.9RC4, OCaml version 4.01.0):
# if false then print_endline "false" ; match () with () -> print_endline "match";;
match
- : unit = ()Sorry I realized my mistake and deleted my comment before I saw yours.
FTR, I was saying that the ";" in the `then` clause of the if statement didn't end it, but it actually does. I see that arjunnarayan got this wrong too in his comment here: https://news.ycombinator.com/item?id=8498187.
The correct indentation of the above code is:
To have the same meaning as the indentation implies, you would need to add `(...)` or `begin ... end` at the appropriate places.