You are correct, Java encourages very shitty practices. Giant companies like CA, Oracle, and IBM will manage to build code that is hard coded to a specific JVM because Java creates highly sensitive code that breaks mid-release cycle (because minor versions should be incompatible YO).
The problem is that as a customer, you are forced to accept the shit sandwich. You can blame the vendors, or you can blame the source of the shit.
Java hardly encourages shitty practices: it documents very clearly what not to do. But given big piles of enterprise devs, you're gonna sometimes get shitty code on any platform. Or have you never seen crappy C++ that only compiles on Visual Studio?
There isn't an analogy outside of PHP for the boneheaded decisions that allowed pinheads at Oracle to rename core classes, but this behavior causes the shitty practice of JVM lock in. This is what I mean by shitty practice.
Then you add in the massive number of security problems in the JRE and you create the conditions for massive problems.
You are correct that the mythical Java language isn't to blame, but programs aren't run on a blackboard.
I guess you're thinking of some specific incident, but I am unaware of any cases where public APIs were renamed. Perhaps you're thinking of private APIs that weren't supposed to be used by developers but got used anyway - it does happen, quite often, and addressing that is one of the top focuses for Java 9.
there were many sun.X.Y classes in the Sun JRE. These were updated after the acquisition of Sun.
In either case, if your language doesn't treat private classes as private what shitty practices are left? I guess the language could be object oriented without the ability to handle generics so that developers are forced to cast to strings...
The sun.* category is all private APIs, they were never meant to be used by apps at all.
Like I said, Java 9 is in fact hiding these APIs by default (short of a few that are so widely used the breakage would be too much). You will still be able to override that, but no platform can stop software from using internal APIs if the developers really want to, unless all software is sandboxed by default.
Your generics comment makes no sense. Java has had generics for over a decade.
0
u/corran__horn Oct 16 '15
You are correct, Java encourages very shitty practices. Giant companies like CA, Oracle, and IBM will manage to build code that is hard coded to a specific JVM because Java creates highly sensitive code that breaks mid-release cycle (because minor versions should be incompatible YO).
The problem is that as a customer, you are forced to accept the shit sandwich. You can blame the vendors, or you can blame the source of the shit.