Comment by Joker_vD

2 days ago

> The (n: i32) can be just (n i32), because there is no benefit to adding the colon there.

> The -> i32 can also be just i32 because, again, the -> serves no purpose in function/method definition syntax.

Well, there is, but it's more of a personal trait than a universal truth. Some human programmers (e.g. me) tend to read and parse (and even write, to some extent) source code more accurately when there is a sprinkle of punctuation thrown in into a long chain of nothing but identifiers and subtly nested parentheses. Some, e.g. you, don't need such assistance and find it annoying and frivolous.

Unfortunately, since we don't store the source code of our programs as binary AST blobs that could be rendered in a personalized matter, but as plain text instead, we have to accept the language designer's choices. Perhaps it actually has better consequences than the alternative; perhaps not.

the only reason why one might hold such an opinion is the lack of syntax highlighting.