If some naming conventions, such as uppercase-method-names, are so frowned upon, why do languages allow them at all?
java, language-agnostic, naming-conventions
Solution
Coding style is like writing style. If you write in a style that is diFFicult TO READ And does not read very well your mINd hAs GReat diFFICULTies actUally understanding what you are reading.
If, however, like in normal reading text - it is laid out in a form that matches well with what your mind expects then it is clear and easy to understand.
On the other hand, if the language actually FORCED you to write everything using EXACTLY the the right syntax then not only would it make coding slow and awkward but it would restrict your expressiveness.
Many years ago I came across a language that allowed you to add strange symbols to variable names. Users were allowed to do thing like:
var a=b = a = b;
var c<d = c > d;
if ( a=b & c<d ) ...
i.e. `a=b` was a perfectly acceptable variable name, so was `c<d`. As I am sure you would agree, this led to many mistakes of interpretation. Even if a new language allowed that I would not use it. Coding standards are for consistency and helping the human mind understand, syntax is for helping the computer mind understand.
Problem
Is there a practical or historical reasoning behind languages allowing the most egregious naming convention taboos? The two most obvious examples are uppercase function names and lowercase class names, which I often see violated in stackoverflow newbie questions. There is no style-justification that I know of where you can do these things, so why are they even allowed to compile? At the moment, my theories are - It was not such a taboo when the language was built, - It would make some important edge cases impossible, or - It's not the language's job to enforce good style. I can find nothing on this topic (some links are below). There are some conventions, such as underscores beginning variable names, or Hungarian notation (the latter of which I have been personally disabused of in comments) that are not overwhelmingly accepted, but are less divisive. I'm asking this as a Java programmer, but would also be interested in answers form other language's. Some links: - http://en.wikipedia.org/wiki/Naming_convention_(programming)#Java - http://docs.oracle.com/javase/tutorial/java/javaOO/methods.html - http://en.wikibooks.org/wiki/Java_Programming/History - How important are naming conventions for getters in Java?