Hacker News new | past | comments | ask | show | jobs | submit login

That was entirely intentional. Java adopted some C/C++ conventions that its designers knew were suboptimal, like == being reference, i.e. pointer, equality, switch statement with fallthrough etc. (even automatic number promotion, though I'm not sure it was clear to Java's designers that may not be such a good idea) precisely because they wanted C/C++ developers -- basically the entire market for Java developers at the time -- to be able to learn it quickly and make it feel familiar. Familiarity was purposefully chosen as one of the top design goals, as explained by James Gosling[1].

Today, these decisions would have been different, as C++ no longer reigns supreme. I find that Kotlin has completely adopted all of Java's core values, but modernized the specific syntax and semantics. Kotlin is what Java would have been if it had been designed today. The fact that Kotlin has made interoperation so seamless (you can switch any single Java class with a Kotlin file in an existing project -- IntelliJ would even automatically translate it for you) makes transitioning from Java to Kotlin (if you want) so smooth and gradual that it's a tru pleasure (even working on a mixed codebase).

[1]: http://www.win.tue.nl/~evink/education/avp/pdf/feel-of-java....




FYI: C conventions are also used in Objective-C.

OTOH - where are the named parameters in Java method calls?

The creators had Objective C in mind, but the result is so stripped down, it becomes an ink blot test for the viewer to see what they want :-)

I sure as hell don't see "Eiffel", though. JavaBeans are evil.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: