The nice thing is that if compiled on Java 1.0, it will run faster on a modern JVM....and if you actually did write a library in Java 1.0 25 years ago, it will work great with the latest Java code you write today.
It used to be heavily hyped, but I sense people don't appreciate it enough the "write once, run anywhere" features. Originally, it was hyped to allow windows/UNIX/linux cross-compatibility...but now I really appreciate how it means it works great across OS generations. Patch your underlying OS all you want, your Java code will still run great...I have been burnt by Node and Python apps breaking on OS updates.....NEVER had such an issue in Java and the Java apps I write and run are far more complex.
Java is not as fashionable as it was 15 years ago, but it really underappreciated. People take for granted how great it is.
Totally agree. People like to bash the language because of how they feel about Oracle.
But if we put politics aside and focus solely on the text, there is something to be said for my ability to deploy openjdk on a raspi, run all the code I expect it to run at quite a high level of performance, and it is just about as easy to use as node.
For me it is the perfect sweet spot of performance and lack of needless complexity (C++...)
Plus your libraries written on today's Raspberry Pi, will work on whatever device you use 20 years from now...no matter the OS evolution. You really can just solve a problem once and never think about it again.
It's not 1.0, but I had occasion to run a snippet of code on JDK 1.2 the other day to see how it behaved. Here's how it went:
// what I wanted
var strings = List.of("a", "b");
// get rid of var
List<String> strings = List.of("a", "b");
// get rid of collections factory
List<String> strings = new ArrayList<>(Arrays.asList("a", "b"));
// get rid of diamond
List<String> strings = new ArrayList<String>(Arrays.asList("a", "b"));
// get rid of generics
List strings = new ArrayList(Arrays.asList("a", "b"));
// get rid of varargs
List strings = new ArrayList(Arrays.asList(new String[] { "a", "b" }));
// oh that's ugly just add the strings explicitly
List strings = new ArrayList();
strings.add("a");
strings.add("b");
I'm pretty sad that back then github didn't exist. I created a ton of Java code when I started with Java in school in '98 but all of that is gone now. Would be fun to see some of my projects from back then and how the way I do things has changed over the years. That was 1.2 though; never used older versions.
I can see what 'period' I was in from my Github repo's. When I worked on a project where the rule was to prefix member vars with underscore I did the same in my personal projects for example. It's a bit like counting tree rings and finding there was a fire 10 years back :)
12
u/OtherOtherNeRd May 21 '20
Anyone else want to write some programs in Java 1.0 for some frustrating nostalgia?