4 ms·
Java's design is far from the Antoine De Saint Exupery definition of perfect: https://www.brainyquote.com/quotes/quotes/a/antoinedes121910.html https://www.brai
by nailer 9y ago
Java's design is far from the Antoine De Saint Exupery definition of perfect: https://www.brainyquote.com/quotes/quotes/a/antoinedes121910.html https://www.brainyquote.com/quotes/quotes/a/antoinedes121910...:
For example:
https://www.zeroequalsfalse.press/2017/06/22/java/output.png https://www.zeroequalsfalse.press/2017/06/22/java/output.png
- The author and date are redundant, these are typically stored in source control
- The program itself should already be a class, specifying a containing class and function shouldn't be necessary.
- Public (or private) should be default.
- Make returning void a default, and stop asking developers to unnecessarily define it.
- 'System' is a vague word with many possibilities. It can man: OS kernel, services, OS, VM, stdlib, and many others.
The entire example except 'print("hello")' is wasted tokens and noise.
- currysausage 9y agoThe example also shows how ridiculous many syntax highlighting schemes are. So much emphasis is put on boilerplate; the identifiers (which I'm usually looking for in code) almost fade into background.
- nradov 9y agoThere is no requirement to include comments with the author and date. Package private is a reasonable choice for the default access modifier. Changing the default to be public or private wouldn't improve the language.
- nailer 9y ago> There is no requirement to include comments with the author and date. Ack, but it's a strange culture that does so. So you can omit 'public' or 'private' as keywords and the function / method will be package-private?
- nradov 9y agoYes that's clearly stated in the Java Language Specification.