Style
Style is the manner or mode of expression in a program. It is distinct from the meaning of the code. Proper utilization of style elements can contribute significantly to understandability by programmers attempting to ascertain the semantics of an algorithm. These style elements include whitespace, placement of language elements, and naming conventions.
Whitespace characters separate language elements such as identifiers and keywords. These characters include newline, tab, form feed, and control-Z characters. A program may have any amount of whitespace between language elements. The compiler will ignore any extra whitespace. Effective use of whitespace goes a long way toward making programs readable.
A consistent naming convention can also ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access