3 ms·
Too bad about the trailing commas and semicolons. It would be cleaner if they could be implied and there be punctuation for when a comma or semicolon is not mea
by karmakaze 7y ago
Too bad about the trailing commas and semicolons. It would be cleaner if they could be implied and there be punctuation for when a comma or semicolon is not meant.
The commas aren't visually as bad as the semicolons. Would it work to say in an off-side block any non-blank line implicitly ends with semi-colon unless it explicitly ends with comma or colon?
- chankyin 7y agoThis project is mostly about the indentation. Semicolons aren't really part of this project.
- chankyin 7y agoAlso, semicolons in Rust have special semantics. In Rust, semicolons are delimiters rather than terminators, and function similar to how comma operators work in C++ (see https://en.cppreference.com/w/cpp/language/operator_other https://en.cppreference.com/w/cpp/language/operator_other). While some may not like the implicit return behaviour in Rust, I think it has a genuine idiomatic meaning in Rust that cannot be easily replaced. Ending a function with a semicolon differentiates returning the last value from returning void (i.e. the empty tuple), so it does not seem like a good idea. (This is a proof of concept anyway it's not like I'm introducing a new language)