I was reading the C++ FQA, C++ Frequently Questioned Answers. It’s a C++-hater rant, cleverly disguised as a point-by-point refutation of the C++ FAQ Lite (which happens to be, for example, the top Google result for “C++ FAQ”).
Let me repeat that: The C++ FAQ Lite is the top Google result (in my world, that translates to “most popular and important”) result for C++ FAQ. If someone is told to “read the FAQ”, this is what they’re likely to read. Let us assume, for the sake of discussion, that this is not the result of a Google bomb — that most C++ bloggers and wiki-writers think this is the best link.
Why do I think that this assumption is not trivial? Because of this:
[18.8] What does “const X& x” mean?
const X& x and X const& x are equivalent. The real question is which should be used.
Answer: absolutely no one should pretend they can make decisions for your organization until they know something about your organization. One size does not fit all; there is no “right” answer for all organizations, so do not allow anyone to make a knee-jerk decision in either direction. “Think” is not a four-letter word.
Yes, this reader. This is not a joke. The FAQ actually tries to say with a straight face that the form of const usage is a business issue. A business issue? Seriously? They think that it matters to a business which is used, other than it be consistent?
Sometimes, saying something like “this is a mistake in the language definition, but it’s really redundant — just pick some version, and be consistent about it” is more honorable than continuing:
Use a style that is appropriate for your organization’s average maintenance programmer. Not the gurus, not the morons, but the average maintenance programmer. Unless you’re willing to fire them and hire new ones, make sure that they understand your code.
Really? Really? They think it that different programmers have different ways of coping with the placement of a FREAKIN’ CONST QUALIFIER???
When I read the FQA, I assumed they were quoting out of context. They’re not. Neither am I. The FAQ is, actually, that silly.