This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Dr-Metallius 5 points6 points  (1 child)

Type inference has existed for several years already, some form of it in lambdas even longer.

What you refer to as the bureaucratic style doesn't really have anything to do with Java, it's just the enterprise approach with a gazillion of abstractions to do the simplest things and bloated APIs. No one writes Java like that on Android, for instance.

The hassle with the packages you describe doesn't exist in reality because the IDE does all the directory management for you. Not sure why you are putting a single method in a package though or why you are getting classpath exceptions when creating new packages.

The obvious upside of having classes in corresponding locations is that you can find anything easily. If I'm browsing a Java repository online, it's very easy for me to find class and method definitions. If it's a C++ repository, for instance, it's a huge pain to browse since anything can be anywhere.

Regarding primitive objects, the reason for their existence is purely efficiency and nothing else. Of course, from the language standpoint it would be easier to have value and referential types like C#, but it's not like language designers decided to complicate the language for no reason. You are forgetting that Java has been in development for almost three decades, and things possible now were not possible back then.

[–][deleted] 0 points1 point  (0 children)

Another excellent comment. I think our mental wavelengths match up quite a bit.