Optional curly brackets

Mandatory curly braces are an intentional design choice. Optional braces don't provide the ability to write cleaner code, quite the opposite. They are a common source of mistakes, like dangling else or bad block nesting.

It's part of the features that Graydon Hoare (the original creator of Rust) is very proud that Rust shipped without:

https://graydon2.dreamwidth.org/218040.html

31 Likes