Chapter 17. Syntax

I dreaded writing this chapter, because style wars on such topics are generally futile and cannot be won. I would bet my house on the proposition that it is impossible to write a chapter such as this that would elicit agreement from all, or even most, readers.

Hence, I'm not going to proselytize you with the virtues of my bracing style, or my exact conditional expression indentation, or even to convince you of the virtues of always putting expressions in braces. There are, however, parts of the C++ syntax that seem to positively invite errors, and those I am compelled to address, even though I expect some of you gentle readers to strongly disagree with my statements.

Class Layout

This item revolves around the way we lay out class ...

Get Imperfect C++ Practical Solutions for Real-Life Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.