

Coding Style as a Failure of Language Design - mgunes
http://weblogs.mozillazine.org/roc/archives/2010/07/coding_style_as.html

======
makecheck
I think one of the bigger cases of "forced inconsistency" is with inheritance.
Unfortunately, if you have a class with methods like fooBar() that inherits
from something that uses a different convention, e.g. to implement STL methods
like max_size(), then you will have 2 conventions in the same class.

And yet, what's interesting is that naming inconsistency seems to be a C++
problem. You could argue that it is just as technically possible to do weird
name inheritance in Objective-C, and yet it doesn't happen; the conventions of
Cocoa are somehow applied consistently enough, and followed by developers to
the letter.

The funny thing about Objective-C is that you see a different kind of style
problem; _indentation_ and _alignment_ tend to vary a lot more between code
snippets than they do in C++.

I'm not sure that automated enforcement after the fact is the answer, because
the scanner might be pretty easily fooled (or worse, it may refuse to let you
do something you know you want).

IDEs might be the closest thing to "enforcement", since they try to make it
easy to create new code snippets, and those will naturally follow a certain
style. At some point, if one is used to these tools, it may be simpler to
follow the rules than not follow them. On the other hand, I generally hate
IDEs, and I enforce my style by myself. :)

