The main alternative is paired symbols or keywords. Most programming languages use this means to mark blocks.
C-syntax family: whitespace is ignored. Blocks are marked between curly braces { and }. Advantage: code can be reformatted and neatly indented, even automatically, with no fear of change to block structure. Disadvantage: human readers see indentation easily and quickly and often miss much formal meaning communicated in braces, unless they are very careful.
Pascal family: blocks shown by keywords, start with "begin", end with "end".
LISP family: doesn't differentiate statements from expressions, parentheses are enough.
POSIX shell family: blocks start after each control keyword and end with the keyword written backwards: "case" starts conditional statements, "esac" ends them.
More information
Subcategories 6
Related categories 2
Sites 1


- Recently edited by mcoupal