I have a question about language in Java. I've tried googling for an answer, but although I found a related question regarding personal preference, the technical side wasn't really addressed. So this is it-
Does it matter to Java if you use British English or American English? Does it cause any complications technically speaking if you use British English (as long as your code is written consistently)?
I'm Australian and proud of the Britishness of our language so this is relevant to me.
The Spec says:
"An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter."
You write code in Java, not in English, German or Chinese. Java doesn't care if your "identifiers" (package-names, class-names, variable-names,, method-names etc.) are a real word at all, if you look at obfuscated code, you'll see class-names like "A" and method-names like "x". Since Java supports Unicode, you could use non-ascii letters like 'ö' or even Chinese signs.
Java-Keywords (public
, protected
, while
etc. and true
, false
and null
of course) are fixed, you have to write them the way the Specification says.
The ultimate goal of any code (Java or not) to be easy readable. You should not use terms that others can't clearly understand (domain-specific terms are exception). So choose not between British and American, but between less and more clear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With