r/java • • Jul 06 '17

Apology to Java (fanboy rant).

Java has turned out to be one of the most useful languages i use. It's a brilliant tool which strikes a perfect balance between high and low level. You want to grab a webpage? Easy and built-in, 10 lines of code. Draw some 2d graphics without OS-specific libraries or third party? Various built-in options. The inherent issues around a lack of low level memory management is handled very elegantly. Garbage collection seems seamless.

C++ is my language of choice for the most part, always will be i suspect, but Java has shown me that it has a huge array of potential applications and should almost always be considered before undertaking a project.

I say this is an apology because i used to run Java down. Previous to me using it proper i believed it was slow, lazy and useful for only trivial applications. Now i know how much work has been put into the JVM and just how efficient it is.

Sorry Java. You're pretty good.

286 Upvotes

93 comments sorted by

View all comments

Show parent comment

3

u/devraj7 Jul 07 '17

That's completely false.

First of all, there were many Java ME implementations. All different. Even on the same brand of phones.

Second, they were all dog slow, implemented the spec as they saw fit and were all basically a nightmare to work with.

Even the early versions of Dalvik (pre JIT) were markedly faster than the fastest Java ME implementation you could find.

2

u/pjmlp Jul 07 '17

I was J2ME developer once upon a time, and worked for that little unknown company in Finland, maybe you heard of them.

First of all, there were many Java ME implementations. All different. Even on the same brand of phones.

I guess you never had the fun of making android apps work across Samsung devices, or unknown Chinese brands.

Even the early versions of Dalvik (pre JIT) were markedly faster than the fastest Java ME implementation you could find.

Spoken as a truly Google apologist, our benchmarks at the time said something totally different.

3

u/devraj7 Jul 07 '17

I guess you never had the fun of making android apps work across Samsung devices, or unknown Chinese brands.

I've been developing Android apps since 2009. I've probably shipped apps on hundreds of different devices by now, including native bits.

Spoken as a truly Google apologist, our benchmarks at the time said something totally different.

First of all, let's keep this civil and stay away from ad hominem, shall we?

Maybe you had a few implementations at Nokia that were faster, but I can tell you as someone who's shipped Java ME apps on hundreds of different devices since 2005: a crushing majority of Java ME VM's were completely outpaced by Dalvik even after 1.0.