But my comment was in reply to:
> no semicolons after things that use {}, semicolons after everything else.
Which seems fundamentally flawed for a cheatsheet. Unless you never intend to return anything with a bracket, I guess.
> no semicolons after things that use {}, semicolons after everything else.
Which seems fundamentally flawed for a cheatsheet. Unless you never intend to return anything with a bracket, I guess.
Putting a semicolon after an expression makes it into a statement, which are unit-valued, which is why the expression's value gets suppressed. It's a subset of "statements not ending with blocks" (since an expression-statement doesn't take a statement-block even if the expression itself has one).