Live data from Hacker News

Java 9 with GPU processing, Java 10 will be all-OOP without primitives

javaworld.com

1–10 of 138 posts

Re: Java 9 with GPU processing, Java 10 will be all-OOP without primitives

#3
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.

Re: Java 9 with GPU processing, Java 10 will be all-OOP without primitives

#4
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.

Re: Java 9 with GPU processing, Java 10 will be all-OOP without primitives

#5

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...

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.)

Re: Java 9 with GPU processing, Java 10 will be all-OOP without primitives

#6

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...

I think similar to C# where the primitives are objects is what they want, terribly misleading title I agree. However, I cringe when I think of what this does to performance. The memory overhead of objects in java is pretty high (relative) while primitives are very memory efficient. If they can make the primitives just as efficient, it would be awesome, but I guess its a wait and see. I don't currently mind using the static classes on the object representation of the primitives to do things.

Re: Java 9 with GPU processing, Java 10 will be all-OOP without primitives

#7
Marta Jasinska posted her notes: http://kreskasnotes.blogspot.com/2012/03/qcon-2012-future-of...

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...

Re: Java 9 with GPU processing, Java 10 will be all-OOP without primitives

#8

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...

Classes are already objects. I don't know whether Java 8 will finally introduce function as a data type, but if it does, I'm pretty sure they won't do it the way Ruby blocks work (i.e. block is not an object).

Re: Java 9 with GPU processing, Java 10 will be all-OOP without primitives

#9
post #5

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...

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.)

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?

Re: Java 9 with GPU processing, Java 10 will be all-OOP without primitives

#10
post #5

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...

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.)

Clojure has both function objects and interfaces (called 'protocols'). In fact, it encourages the use of interfaces while strongly discouraging the traditional object inheritance model. Most people who've tried it AFIAK consider Clojure a well-designed language.
Post reply on HN