I know, this is not top priority but really wanna ask: can we get rid of those semicolons?
Currently semicolons is required everywhere, it’s really a pain in the ass. I shoot in my own foot so many times while writing motoko app (and now I’m excessively adding semi everywhere for precautionary purpose).
Or, if you guys can ship a code formatter, like
gofmt, I can live with it. Desperately need one!
Yeah its really annoying haha. I agree.
I agree that semicolons can be annoying, but I’m afraid the problem is that they usually distinguish two perfectly valid parses, so they’re not just noise. For example,
is already valid code, meaning
f(4)(5). Similarly for most other cases. So allowing to omit semicolons would be a breaking change, and one that introduces ambiguity for which it is unclear how to resolve it.
A much cleaner solution is how Haskell does it, but its approach is based on a completely different role for braces and semicolons that won’t work with C/Java-style syntax used for Motoko.
Maybe there’s still a way to introduce an ISWIM-style offside rule, but it’s not obvious.