java sucks (2000)
11 points by lr0
11 points by lr0
If Sun hadn't tried so hard to conflate these four completely different things, [language, standard library, VM, and security model] if they had first shipped native-code Java compilers, then the VM, then the security model, then Java probably would have completely displaced C++ by now.
Wow, this seems like a strange take to me! The idea that Java without the JVM would be dramatically more successful than with the JVM isn't something I'd ever heard before. But then again, I only started paying attention to the JVM in 2008 or so. Guess it was a lot worse in early years.
Most of the other complaints are pretty sensible. Not having closures would be brutal. The main exception is complaining about Interfaces feeling "tacked on"; IME these are one of the best things about the JVM's object model.
Yes, as @hyperpape says in another comment, this makes a lot more sense if you realise that HotSpot was first released in 1999. For the first half-decade, Java was all interpreted.
I started working with Java in late '95. On Windows, we got the first JIT in 1996 (just a beta at first, from Borland or Symantec, officially released in early '97 I think). Sun released their first JIT (C1) a year or so later, as did Microsoft.
So only for the first year and a half was Java "all interpreted". But we switched to Hotspot as soon as it was available -- amazing tech for its time.
As someone who was there, Gandalf, 3000 years ago, Java was a breath of fresh air. It was so much nicer than anything other than maybe Objective-C on OPENSTEP.
Sun definitely politicked it to death, but if you wanted to write a desktop application, Java was remarkably pleasant by the standards of the day.
I remember having to deliver Swing applications, while not being able to package a JRE with it. I mean, it was better than MFC, but that's a very, very low standard. Cross-platform still is pretty bad, but when you could just focus on one target, you had some pretty decent options, like Delphi or Tcl/Tk. Modula-3 could've used some GUI toolkit iteration, but the language itself was very solid. Smalltalk was still an option if you had plenty of money.
Java's biggest benefit was being everyone's second choice, though.
Two things which exist now but didn't back then: Cosmopolitan C https://github.com/jart/cosmopolitan and WebAssembly. Cosmo-c aims to allow doing as the author mentioned, write a C program and running it on multiple architectures; and WebAssembly beats Java at it's own game: write once run anywhere (I say beats Java at its own game since WebAssembly doesn't have a requirement of one specific language, and it's been used in embedded environments where it would be difficult to shove a JVM).
If you were around when Java was new you'd remember applets - Java programs embedded in web pages. Didn't take off. So WASM has prior art.
As someone who was there, Gandalf, 3000 years ago, Java was a breath of fresh air. It was so much nicer than anything other than maybe Objective-C on OPENSTEP.
I would argue they dig take off, but then they came crashing down.
They were quite big for a few years.
I dunno: at least where I frequented for awhile there were lots of applets early on. Then plugins started eating applets' lunch, even considering the irony that applets were sometimes implemented in browsers using plugins. Then Flash came along, and people migrated to that, and I think that's what killed the Java applet more than anything else.
.. embedded environments where it would be difficult to shove a JVM
I agree that wasm is a better fit in many cases, but java has ran on smart cards / SIM cards since '96! https://en.wikipedia.org/wiki/Java_Card
Oh man old tech discussions had so much more aura than modern ones.
I still 100% agree with this. And if your argument against this is "well look at C++ they have multiple inheritance and they screw it up" I would retort that if we stopped doing everything that C++ screwed up we might as well stop programming altogether.