
Java 9 with GPU processing, Java 10 will be all-OOP without primitives - Mitt
http://www.javaworld.com/javaworld/jw-03-2012/120315-oracle-s-java-roadmap.html
======
JunkDNA
Wow, how can you seriously plan releases of a programming language out to
2021? That is an eternity in this industry. Even 2015 for JDK 9 seems mighty
far off, especially accounting for the usual slippage of release dates with
big software projects.

~~~
sek
Why don't they start now and build Java 2.0 from ground up instead of Java 10
for 2017?

That would be way faster and they learned so much by now to make a great
successor. Who wants a Java 1.x in 2040?

~~~
francoisdevlin
Because they learned from netscape's mistake, that's why.

<http://www.joelonsoftware.com/articles/fog0000000069.html>

~~~
lhnz
"You are wasting an outlandish amount of money writing code that already
exists."

On the contrary, there has been a number of times that I've _completely_
rewritten some code to use a framework or library that was already battle-
tested and more fully-featured than the previous effort. I ended up _saving_
myself from writing code that already exists.

~~~
anonymous
Right, but you're one person and you're redoing the plumbing.

At this point oracle can't rewrite Java. If they don't support the current
programs, nobody would use it, if they do, they will really be rewriting code
that already exists.

------
nyellin
_The presentation declares, "Java is not the new Cobol."_

It shocks me that a major company like Oracle would be so foolish as to make a
statement like this. Stating that something is _not_ is one of the most
effective ways to imply that it _is_ and the speaker knows it.

~~~
gruseom
Freud somewhere talks about a primitive tribe where the punishment for saying
"The king is not an ass" is the same as for saying "The king is an ass".

Edit: I remember reading this years ago and have been unable to track it down.
Would love it if somebody did.

~~~
surement
Probably in Totem and Taboo? This concept is expressed in a number of his
books, however.

~~~
gruseom
Oh if you could find it I would be super grateful. I've done my usual rounds
such as searching on Google Books and found nothing. Made me start to wonder
if it had been Jung instead.

------
yummyfajitas
It seems to me that eliminating primitives could be a really bad idea. If you
have a class:

    
    
        public class CompoundObject {
            int i;
            int j;
            double k;
        }
    

This class's data members are all a few bytes away from each other, so once
the object is loaded into the CPU cache, all operations should be fast. With
boxed types, you might get 3 cache misses when accessing i,j,k.

On the other hand, referential transparency can help here. Given referential
transparency, the compiler can transparently unbox Integers and translate
method calls. So if Oracle does it right, rather than slowing down unboxed
code, this might just speed up boxed code.

~~~
cynicalkane
They don't say how they're implementing it. Given the compiler always knows
the actual type of a primitive at compile-time, they can probably implement
most of the Object functionality by plugging in the class meta-info at
compile-time. When a primitive would need to be boxed, Java programmers are
already used to the performance implications of this. The only object
functionality I can think of that would be hard to implement on primitives is
wait/notify/synchronization, but I don't actually know how those are done in
the JVM either.

Even if these things turn out to be impossible to optimize at compile time,
they're probably then betting on JIT functionality to detect primitive objects
that are only used as primitives.

~~~
repsilat
The "boxed primitive" types (Integer and so on) should be `final`. This means
no inheriting from them, which means no polymorphism, which means their sizes
and all operations on them are known statically. This means you can store them
as values in the object with no fuss, and you can inline all of their access
functions.

~~~
cynicalkane
Java objects have functionality beyond dispatch tables. Synchronization is
one. You can also have x != y where x and y are different objects with the
same value.

~~~
tsotha
>You can also have x != y where x and y are different objects with the same
value.

May be true, but it's not guaranteed one way or the other. In the Oracle JVM
the smaller integers are cached such that

    
    
      new Integer(10) == new Integer(10)
    

but

    
    
      new Integer(1000) != new Integer(1000)

~~~
teraflop
Actually, "new Integer()" is guaranteed to always return a new, distinct
object. The caching only comes into play during autoboxing conversions, or
when you call Integer.valueOf().

~~~
tsotha
Ah, you're right. I was thinking of autoboxing, i.e.

    
    
      Integer a;
      Integer b;
    
      a = 10;
      b = 10;
      a == b; // true
    
      a = 1000;
      b = 1000;
      a == b; // false

------
floppydisk
I'm curious how they're going to handle the GPU thing since there really isn't
a unified GPU architecture, yet (by 2015, who knows but still). Have vendor
specific translations or try to rally around something like OpenCL? I'd love
it if GPU coding would become more available and vendor agnostic, so I'm
really curious about this.

I know the article didn't mention it, I also wonder what the memory bloat will
look like when they turn all primitives into Objects and introduce object
overhead just to track int i in a for loop.

------
jt2190
Marta Jasinska posted her notes:
[http://kreskasnotes.blogspot.com/2012/03/qcon-2012-future-
of...](http://kreskasnotes.blogspot.com/2012/03/qcon-2012-future-of-java-
platform-java.html)

These slides were posted last November, so they're probably a bit stale, but
might give some insights: [http://www.slideshare.net/JAX_London/keynote-to-
java-se-8-an...](http://www.slideshare.net/JAX_London/keynote-to-java-
se-8-and-beyond-simon-ritter)

------
dkarl
Video and slides of the same presentation by the same presenter in October
2011: <http://lanyrd.com/2011/jax-london-autumn/sgzyx/>

It's mind-blowing that they plan on having GPU and FPGA support before they
offer arrays of structs and multidimensional arrays. Frustrating, too. I guess
I can't complain, since clearly somebody is paying for all this, and it isn't
me.

------
bromagosa
All-OOP? So functions will be objects too? And classes? And contexts?

Not meaning to start a flame, just saying the title's a bit inaccurate IMHO...

~~~
c4n4rd
This is a very good point. If functions become objects, interfaces would
become literally useless. Somehow it seems that it would not be the case since
this would be a drastic change (even thought getting rid of primitives are as
well.)

~~~
CodeMage
Literally useless? Would you like to elaborate on how specifying a contract
that has to be implemented is suddenly useless because you have function
types?

~~~
yummyfajitas
I think the experience of Haskell is relevant here. Once Haskell introduced
first class functions, everyone stopped using typeclasses.

[edit: apparently my sarcasm was too subtle. HOF and typeclasses are both
vitally important pieces of Haskell, which are orthogonal to each other. I'm
pretty sure both were in Haskell from day 1. Some code for which both are
essential:

    
    
        class Monad m where
          (>>=) :: m a -> (a -> m b) -> m b
          (>>) :: m a -> m b -> m b
          return :: a -> m a
          fail :: String -> m a
    
    ]

~~~
calpaterson
I don't think typeclasses were in from day one, they were added quite late in
the development of the language (but some years before H98). I don't think
they're in Miranda, for example.

Here's a paper introducing them.

<http://dl.acm.org/citation.cfm?id=227700>

~~~
SamReidHughes
Type classes were in Haskell 1.0. See
[http://webcache.googleusercontent.com/search?q=cache:rtFsiQC...](http://webcache.googleusercontent.com/search?q=cache:rtFsiQCtqxYJ:www.haskell.org/definition/haskell-
report-1.0.ps.gz+&cd=2&hl=en&ct=clnk&gl=us)

------
6ren
They _can_ plan like this because they _are_ the new cobol - they have an
assured install base. If they make 100% back-compatible, and definitely
better, everyone will upgrade.

As for the very vague improvements mentioned (GPU, no primitives), these can
be seen in response to clear technology trends. Even the embedded GPUs in x86
are getting pretty powerful, though not every business has them - but by 2015
most will. Java has primitives primarily for performance and memory
efficiency. Absolutely crucial at Java's inception, they though remain
important today, many applications can get away without them (e.g. ruby apps).
By 2017. even more apps will be in that category.

Most of the others are similarly responses to clear trends, such as
hypervisor-aware and large data support. However, true generics seems
problematic because it would break back-compatibility.

My prediction: _if they plan to break back-compatibility they will change
their mind._

------
friendlytuna
More discussion from Java vets: [http://java.dzone.com/articles/oracle-
discusses-features-jav...](http://java.dzone.com/articles/oracle-discusses-
features-java)

------
zanny
I just want passable functions, or even better, first class functions in
module namespace.

I still find it hilarious how even Swing shows how crippled the language is
without that feature, where adding event listeners is complicated like new
EventListener(Event e) { @override onEvent... etc. When just overriding some
declared event handler method would be so much clearer.

------
michaelhoffman
At first I thought this might be an early April Fool's Day joke. But I don't
think it is.

------
elbac
I'd really like to see some of the deprecated parts of the JDK removed.

------
nivertech
April 1st in two days, but I guess some people can't wait ;)

------
codedivine
Anyone have a link to the actual slides from Oracle?

~~~
woky
Not sure, but maybe this:

[http://qconlondon.com/dl/qcon-
london-2012/slides/SimonRitter...](http://qconlondon.com/dl/qcon-
london-2012/slides/SimonRitter_TheFutureOfTheJavaPlatformJavaSE8Beyond.pdf)

I hate those articles not mentioning sources.

------
shareme
I think I will switch to Google Go

