Thus: (if (< foo 0) (do-this) (do-that))
or if it's long
(when (< foo this)
(some-stuff)
(more-stuff)
...)
Obviously one can do this in C++ by introducing a block, but it isn't as syntactically natural; a block implies that there is important RAII involved, so usually I just do it by "vertical clumping"I find the standard c style (used by lots of languages) actually spreads the code out too much, emphasizing the curly braces rather than the code itself. (this is a local version of the OO+IDE plague that smears functionality across lots of tiny files.
This sense of locality is presumably why the gnu programming style is compact in some ways and expansive in others, different from K&R style, for example,
return-type function-name ( type1 arg1 ) {
allows the eye to see the identifiers without the syntactical markers () and {}, letting indentation and vertical whitespace to tell a story.
* except, de facto, Interlisp because it normally used a structure editor rather than a text editor.
Then, eventually, along comes Common Lisp with symbols like multiple-value-bind and update-instance-for-redefined-class.
I made a dialect called TXR Lisp in which most of the important symbols in the standard library are deliberately quite short, to avoid this readability/writability issue.
Lisp code often avoids vertical breaks within sections in a function, because many constructs nest, and so the nesting and indentation separates them already, like:
(while ...
...
(let ...
...))
(while ...
It's like point form: - abcde
- efgh
- jlk
- mn
- next point