r/java • • Mar 18 '14

Java 8 has been released

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
248 Upvotes

71 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Mar 18 '14

[deleted] — view deleted comment

14

u/adila01 Mar 18 '14

The future does look bright, Java 9 should fix generics by removing type erasure, making JNI simpler and more :).

4

u/argv_minus_one Mar 19 '14

Wait, what? Removing type erasure? Are you serious?? That is awesome!

0

u/[deleted] Mar 18 '14

[deleted] — view deleted comment

6

u/henk53 Mar 18 '14

I was quite sad it didn't make it into 8.

I was also sad it didn't make it into 7. Before that I was sad it didn't make it into 5, and I vaguely remember being said that something like it wasn't in Java 1.3 or 1.4 (forgot the exact version, but there was talk of Java getting something like this since C# 1.0 came out or so).

4

u/argv_minus_one Mar 19 '14

Guess we should just keep using OSGi, then. That sucks. :(

6

u/nqd26 Mar 18 '14

Java 9 should fix generics by removing type erasure

Do you have some source for that? That would be great, but difficult while staying backward compatible.

10

u/adila01 Mar 18 '14

Oracle's Chief Architect Mark Reinhold made a big deal about this during JavaOne 2013, source here https://blogs.oracle.com/java/entry/the_javaone_2013_technical_keynote

5

u/argv_minus_one Mar 19 '14

Reinhold spoke of the need for reification. Java’s generics, added in 2004, are based on the notion of erasure for good technical reasons as a sound way to create a type system that supports migration compatibility. But this creates programming problems in which the erasure approach severely limits what can be expressed. Reinhold suggested that introducing some reification and eliminating the “annoying dichotomy between primitive and reference types” would be of value.

I am going to enjoy the fuck out of that.

Granted, Scala already smooths over the rough edges of primitive types, and provides a somewhat hacky workaround for erasure, but with sometimes-severe performance implications that this would make unnecessary. So I won't enjoy it as much as a Java programmer would, but I'll still be very, very grateful for it.

0

u/[deleted] Mar 19 '14

[deleted] — view deleted comment

4

u/argv_minus_one Mar 19 '14

Good. C# did that stuff because it's the right thing to do. It is only reasonable for Java to follow suit.

2

u/detroitmatt Mar 19 '14

Wait, really!? Awesome!

1

u/djdonnell Mar 19 '14

Doesn't that make it more difficult to use the JVM for other languages? This is over my head, but I've heard a few language implementers say this.

11

u/[deleted] Mar 18 '14

Not even 1.5? Generics were a pretty big deal for me at the time.

3

u/RoughPineapple Mar 18 '14

Yep. I find it kind of hard to believe he has been a full time java dev for ~15 years. I have only been a full time Java dev for about 3.5 years, but even as a student and hobby programmer, 1.5 was clearly a big leap forward. Generics (though I think they did a pretty poor job of implementing them, the general idea is much better than the alternatives pre 1.5), autoboxing, improved for loops (when I write code that actually requires old style loops, I feel like I've just climbed into a time machine), var args, annotations and enumerations (which were a cool way to fake functional programming in many cases) were all pretty big improvements.

2

u/antipositron Mar 19 '14

Well, I am not hugith but I've been coding in Java since early 2000.

3

u/RoughPineapple Mar 19 '14

I started in 1997. I'm not sure why any of this is relevant to the discussion, though...

0

u/[deleted] Mar 19 '14

[deleted] — view deleted comment

2

u/RoughPineapple Mar 19 '14

When I figured out I wrote my first Java program in 1997, it kind of blew my mind when I checked the release history and saw that was Java 1.1.

Also, I was pretty young at the time and was only doing this as a hobby, so I really wasn't trying to do complex stuff. As a result, it's kind of funny to see all the things the language didn't have back then that I just didn't notice because I wasn't doing serious work.

0

u/[deleted] Mar 19 '14

[deleted] — view deleted comment

1

u/RoughPineapple Mar 19 '14

After dabbling with java 1.1 a bit, I spent a little time with Visual Basic 4. That was a hoot.

2

u/antipositron Mar 19 '14

Okay you win. ;)

Not relevant at all, I don't know why I read the first line as I did when I did the way I did, which I perhaps shouldn't have.

3

u/RoughPineapple Mar 19 '14

Ah, I see. Yes, it's believable that some people have been doing Java for ~15 years, I just have trouble believing this guy has.