Why is following Java naming conventions not required for compilation

Why is it not needed for a Java application to follow the Java naming conventions? In other words, why doesn't the Java compiler raise an error when the conventions are not followed in an application? It would certainly make the life of every programmer easier if no code would exist that contains, for example, class names starting with a lower-case letter or package names starting with an upper-case letter.

I understand that it is not possible to start requiring this now, because that would break existing applications, but why has this not been required from the beginning?

Jon Skeet
people
quotationmark

Why is it not needed for a Java application to follow the Java naming conventions?

Because they're conventions rather than rules. It would be very odd for naming conventions to be enshrined in a language specification as actual rules - I don't think I've ever seen that. Naming it seen to be primarily a developer's choice, with some suggestions to make things more consistent between other developers.

Any Java compiler which refused to compile unconventional code would be violating the Java Language Specification.

Would you also suggest that brace formatting should be enforced by the compiler? How about the ordering of import statements?

While I would certainly recommend that Java developers should follow the naming conventions - at least wherever reasonable (there can be odd capitalization cases which make this difficult... anything around iPhone for example could look odd one way or another) I would be against them being proscribed as "law" in the language specification.

people

See more on this question at Stackoverflow