October 2004
Intermediate to advanced
240 pages
6h 22m
English
Parameterize well: Distinguish among input, output, and input/output parameters, and between value and reference parameters. Take them appropriately.
Choosing well among values, references, and pointers for parameters is good habit that maximizes both safety and efficiency.
Although efficiency should not be our primary up-front concern (see Item 8), neither should we write needlessly inefficient code when all other things, including clarity, are equal (see Item 9).
Prefer to follow these guidelines for choosing how to take parameters. For input-only parameters:
• Always const-qualify all pointers or references to input-only parameters.
• Prefer taking ...
Read now
Unlock full access