One of the features that Rust has that makes it unique is the lack of necessity of parentheses on if statements! Good, those are annoying!
The reasoning for the necessity of parentheses in C++, comparatively, is a separator; brackets are not required, so without the parentheses, the statement would slosh together. Omitting the brackets is allowed because, for the same reason, they're annoying.
Rust decided that it would remove the requirement for parentheses in favor of requiring brackets. This was a good idea because it's a good trade-off to focus on a single one of the two separators. Additionally, it is very common to make bugs in C++ where the distinction of a single line after an if statement is missed, so making brackets would make it a lot easier.
And the story ended here.
However, people still have to press shift+[ and shift+] on every small if statement, and it feels a bit old for Rust, which has more potential. Although the IDE can help move around your brackets, not all do so, nor 100% fix the problem, which doesn't need to be there in the first place. Here are two ways, the first less large than the second, that bracket rules could be improved.
-
Allow limited keywords without brackets. "continue" "break" and "return" are very, very commonly used keywords after if and else statements, for more complex control of loops. The brackets are very annoying to navigate around, and do really clutter up the code. An exception of permitting dropping the brackets for single uses of these keywords would go a long way, and would be surprisingly seamless -- the lack of brackets makes it clear that the block doesn't continue, and the keywords wouldn't interfere with any expression logic at all.
-
A separate breaker term. Because brackets are inconvenient, hard to type, and reduce navigability by being on both sides of a script, instead of removing their requirement, a different term could be used after if or else statements. For example, then or do (do specifically because it is already a reserved keyword). This would allow for single-line conditionals and would also be effective at removing confusing distinction errors because of the necessity for another word in between, although it would feel a lot easier to type. Additionally, rule 1 could be coupled with this. It would be possible that an else statement could not require a separator at all because it doesn't need it, but that would probably not be a good feature because it would be confusing that the else statement would have different rules than the if, and because it wouldn't then benefit from the bug-reduction factor.
This change would almost certainly have to be released in a different Edition, and be thought-out, because it is large, but one of these ideas should be done because it would really make a positive difference to the language. Rust has a focus on feeling smooth to use, but these brackets add a lot of friction.