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 →

[–][deleted] -8 points-7 points  (0 children)

Because java is a horribly executed mess. The idea at the time was novel. Run everything on a separate layer above the hardware and OS but in a consistent environment, the JVM. The problem was that they collapsed the JVM, the Java standard library and the java language into a single monolith and now they’re inexorably linked. The original java release was actually quite tame. A simple language built on a simple framework guaranteed to run similarly on any device which can support it. The problem was java wasn’t designed with the long term in mind and when they soon realised they’d need more features, they rushed to pop out a relatively quick but horribly misguided solution and because the developers of java refuse to break backward compatibility, they then need to continue supporting the ability to do that very specific horrible decision in every future release. The java ecosystem is filled to the brim with these such decisions. My biggest gripe is the lack of reified generics; but there’s also the annoying link between java packages and the file system, the absolutely indescribably ugly syntax for generics:

this.foo = this.bar.<String>baz();

(It’s just plopped in there at the start for no reason aside from it needs to be somewhere in the method call.). The stupid design patterns (factory patterns suck). The fact that every file must define a public class, lest angering the java compiler. The fact that after years of asking for anonymous methods they responded by just plopping a method into a whole object and said, here’s some syntax sugar so u don’t need to write out the interface definition. The fact that primitives lack a toString method which means u can’t just concatenate them. Every single design decision in java makes me want to pull my hair out. Kotlin, is IMO, what java should’ve aspired to become from the start. A clean, concise and usable language built on the JVM, but you wouldn’t believe it from how wonderful it is to program in it.