
The Next Twenty Years of Java: Where We've Been and Where We're Going - aaronbrethorst
https://blog.heroku.com/archives/2015/6/4/the_next_twenty_years_of_java_where_we_ve_been_and_where_we_re_going
======
bcg1
Glad to see that I'm not the only one who still likes the JVM after living
through the good, the bad, and the ugly with it.

Freeing Java with the GPL was an amazing move by Sun and kudos to everyone who
made that happen. Without that action, there likely would not be another 20
years at this point.

I think the article is good and I concur that the JVM's future as a
compilation target looks promising. Personally I'm very excited about the
prospect of the JVM being a major platform for Perl 6... Perl has an amazing
community and I look forward to an influx of true hackers into Javaland.

~~~
Someone1234
> Freeing Java with the GPL was an amazing move by Sun and kudos to everyone
> who made that happen.

But due to recent legal rulings (and assuming they don't get overturned in the
supreme court) Oracle has effectively locked Java back down. Even if it is
GPL, Oracle has managed to copyright the APIs themselves, making the GPL-ness
of the Java codebase more or less meaningless.

Sun did make Java free, no doubt about that, but under Oracle it is hard to
argue that Java remains free. It is an Oracle product that Oracle owns, and if
you try to fork it you will be sued (Oracle has made that point abundantly
clear).

To be honest the GPL is now inadequate against this new type of copyright
enforcement.

~~~
pron
I don't think you understand. That APIs are copyrightable means that the GPL
applies even to the API. The GPL does not allow any further restrictions, and
Oracle isn't imposing any. You may do with OpenJDK as you please as long as
you comply with the GPL. You may re-implement the APIs, or use HotSpot's JIT
to compile Brainfuck bytecode -- anything at all. That doesn't mean you can
use the trademark Java for the result, but that's beside the point (and
applies for all open-source projects).

If you _don 't_ want to comply with the GPL and you _still_ want to build an
implementation of Java -- which is what Google did -- only then do you have to
comply with Oracle's alternative licensing, which forces you to make your
implementation fully compliant (Android isn't) and places further restrictions
(such as the use on mobile devices).

In any case, whatever applies to Java applies to any other GPL project. As to
Oracle suing you if you fork Java (and not abide by the GPL), let's just see
what actually happened there: 1/ Google reimplemented Java not under GPL 2/ it
did so while breaking compatibility, and 3/ to directly compete against what
was then on of Java's main sources of income. So, yes, I think it's safe to
say that if you make an incompatible implementation of Java to directly
threaten Oracle's business, they will sue you. I have a feeling that other
companies would do the same.

------
coldtea
> _Today, the JVM runs on an estimated 89% of computers, 3 billion mobile
> phones, and 125 million TV devices._

I'm not even sure the above is technically correct. But even if it is:

1) it runs on most of those "89% of computers" as Java Applets, a technology
noone cares about, not as a readily deployed Java runtime for the desktop.

2) Those 3 billion mobile phones either are Android, in which case they don't
exactly run Java, or are insignificant featurephones with mobile Java that
again nobody cares about.

3) Nobody cares about those "125 million TV devices" as platforms either.

~~~
twp
The JVM has had billions of dollars of engineering effort poured into it. At
the same time, it is still out-performed by low-budget small-team efforts
(e.g. LuaJIT, Inferno).

The article disassociates itself from Java the language. Java was a better C++
in 1994. It has long since been eclipsed by both improved old languages that
have evolved (e.g. C++11/C++14) and new languages (e.g. Go and Rust) that are
unencumbered by the JVM. This is despite recent incremental efforts to renew
Java the language.

Instead, the article tries to claim some success for Java by switching focus
to the JVM. The JVM is still slow and - by its design (a clunky stack-based
architecture) - simple to implement but very hard to run fast.

Java will still be around for a long time to come. It's the COBOL of our
generation: it's better than what it replaced, but far away from what we are
capable of.

~~~
coldtea
> _The JVM is still slow_

What are you talking about? It's the fastest widely deployed VM out there...

~~~
twp
If you want to talk about "widely deployed VMs" then Dalvik is faster. If you
want to talk about VMs in general then there are many that are faster, e.g.
LuaJIT.

~~~
coldtea
Actually no, Dalvik is slower than the JVM and with worse GC.

And LuaJIT faster than the JVM? Where you got that? You wont fine many
benchmarks or people agreeing with you. LuaJIT is faster (much) than most
scripting languages, but not faster than Java.

Are you comparing startup time?

------
vorg
> 2006-2010 [...] a new crop of JVM-based languages emerged. [...] JRuby was
> soon followed by Groovy, Scala, Clojure and many others. Each language
> introduced features that were unique and unavailable in Java

Languages that are JVM versions of already existing languages were out long
before JRuby (JVM' Ruby) and Clojure (JVM's Lisp). I remember Jython (JVM's
Python) was first released around 1997, then called JPython. At that time
there was also the Jacl language (JVM's TCL).

Beanshell's also an older language, which Groovy cloned and added closures
(since made obsolete by Java 8's lambdas) and a meta-object protocol to. As
for Scala, it's like a more statically-compiled and functional version of
Groovy, about which Groovy's creator said he'd never have created Groovy if
he'd known about Scala.

~~~
WalterGR

        Groovy cloned and added closures (since made
        obsolete by Java 8's lambdas)
    

Java's lambdas aren't real closures, though. Are Groovy's?

Edit: "Real" is, I suppose, arguable. By that I meant: Java's lambdas don't
support mutation of captured variables.

~~~
danieldk
_Edit: "Real" is, I suppose, arguable. By that I meant: Java's lambdas don't
support mutation of captured variables._

Then Haskell doesn't have closures either ;).

I think the definition of a closure is: a lambda abstraction / anonymous
function that uses a free variable in its definition. So, Java's lambdas are
real closures.

~~~
WalterGR
Maybe I'm just biased because I was first introduced to closures by SICP, and
so Scheme's take became my personal Platonic Ideal. :)

------
SlipperySlope
Here's hoping that Oracle loses its US Supreme Court case over copyright of
Java API's.

Otherwise I love that Java and GNU/Linux CRUSHED Microsoft in mobile.

~~~
krschultz
One thing to note, GNU/Linux definitely did not crush Microsoft. Android/Linux
maybe, but Android/Linux and GNU/Linux are pretty far apart. There is almost
nothing GNU in Android. Honestly the whole "GNU/Linux" naming things makes a
whole lot more sense in light of Android than it did when we Linux was
basically only popular in conjunction with GNU based desktops & servers.

[http://www.gnu.org/philosophy/android-and-users-
freedom.en.h...](http://www.gnu.org/philosophy/android-and-users-
freedom.en.html)

------
jph
Java's best time may coming up because of the Internet of Things.

At Sun JavaSoft in the '90s, we had IoT prototypes working well, such as
distributed networking, home automation, automobile controllers, and wearable
computing.

It's great to see these IoT concepts are coming to fruition.

~~~
unclebucknasty
Java was truly ahead of its time in that vision. Its promise was initially its
portability, and it always had a network-friendly orientation.

But the plethora of interconnected devices that we have and envision today
simply didn't exist at that time. If Java hadn't hung in there, we'd be
talking about another, more recently created language designed for this
purpose.

~~~
rudiger
Actually, Java was originally developed as a programming language for smart
appliances. Its roots are in IoT and embedded systems with limited resources.

------
jorgecastillo
>It has grown under Oracle -- both in openness and adoption.

No it has not, basically Sun did all the hard work on this areas.

If Google looses (lets hope not) the lawsuit vs Oracle, I hope they give
Oracle what they deserve and switch to C#. Either way I am not using Java (I
don't dislike it!) for anything outside of Android.

~~~
tapirl
golang is the way

~~~
nindalf
Its not possible to use only Go for Android application development. The goal
of both the Go team and the Android team is to make Go a candidate for JNI
development as an alternate to C/C++. The rest of the Android app, especially
the UI can only be written in Java.

~~~
tapirl
It is possible, maybe not now, but very possible later.

UI just is graphics painting using OpenGL ES.

------
justincormack
Odd not to mention Dalvik or Android in this at all.

------
jebblue
The blog is being served by a server called Cowboy, some quick Googling shows
it's written in Erlang.

Overall if Oracle doesn't screw it up, Java (at least the platform) does have
a bright future.

------
spiralpolitik
Java's challenge over the next few years is going be how to make compatibility
breaking changes to the language and standard library without ending up in the
same quagmire that Python did.

If they can do that then I think both language and VM have a decent future
ahead of them.

~~~
MrBuddyCasino
Java is where it is now because it is a stable platform. They would be foolish
to introduce compatibility breaking changes.

------
CrystalGamma
"Nashorn"? I guess someone made a shout-out to Rhino ...

------
PaulHoule
In my mind, Java is the first programming language that was designed by
adults.

~~~
tormeh
Ada?

~~~
nostrademons
Algol 60?

------
GFK_of_xmaspast
It's really too bad RMS squashed gcc targeting the jvm.

------
jslove
JavaScript beats jaVA in every reGARD.. Java is the CoBOL of the 2000s...

~~~
kaeawc
Actually it doesn't. Have you tried making a mobile app with it? The
experience is unacceptably slow and janky. React Native isn't officially
released. That leaves us... with Java or Objective-C.

------
kba
Good write-up, but damn it that guy has got to learn the difference between
"its" and "it's". It's killing me!

------
nbevans
Seems rather pro-biased towards Java.

Case in point: 1\. Not a single mention of its main competitor .NET. 2\. Not a
single mention that as Java becomes more and more closed source and
proprietary, under Oracle's stewardship, .NET becomes more and more open
source and community driven (in the true sense).

------
vardump
> Today, the JVM runs on an estimated 89% of computers, 3 billion mobile
> phones, and 125 million TV devices.

Today, 100% of them run C. Without C, there'd be nothing for Java to run on.

~~~
Someone1234
"Run[s] C" doesn't actually make sense. C outputs assembly, so most of them
run assembly. There are a lot of mobile platforms with no [obvious] C
compiler, or certainly not trivial access to one.

Running Java makes sense, since JavaByte is a "thing." Running C is just
another way of saying they run native binary blobs which is meaningless and
obvious.

~~~
vardump
It makes as much sense as saying they run Java. Java bytecode is JITted into
very same machine code. JVM outputs "assembly" [1] as well. The interpreters
are also written in C or C++, even the partially hardware assisted ones, such
as Jazelle.

All executable code is native "binary blobs" in the end. But they're written
in language X. What I'm saying, is that 100% of those devices contain code
written in C. C is also a "thing", it just happens to be usually compiled
ahead of time.

[1]: Technically the term should be native/machine code or such. Assembly
_usually_ refers to text format assembler listing.

Edit: Wow, so many downvotes? Even though that 100% was just as meaningful as
3 billion. Ok...

------
therealmarv
I'm just happy I could deinstall Java on my mothers PC because 98% (?) of
LibreOffice functionality runs without Java, so no need to keep this hell of
update software on a Windows machine. The first thing Java and especially the
main JVM maintainer for PCs (Oracle) should do is:

1\. stop distributing junk like Ask toolbar.

2\. make Java automatic updates as easy as updating Chrome.

JVM is big adware nowadays and annoying to update for normal non tech people
out there.

