The Details of Oracle's JDK 7 and 8 'Plan B' 204
gkunene writes "Oracle has put Java 7 and 8 features up for Java Community approval, providing a clear indication of what the next two major versions of Java are likely to include. (Java 7 contents, Java 8 contents.) From the article: 'The JDK 7 and 8 JSRs represent Oracle's 'Plan B' approach for separating JDK 7 into two separate releases, splitting up features that were all originally intended for the Java 7 release. This approach is intended to help expedite new Java releases. Among the key components of the original Java 7 plan that are now set for inclusion in Java 8 are the Lambda and Jigsaw efforts. At JavaOne this year, Thomas Kurian, executive vice president, Oracle Product Development, explained that Lambda is all about bringing closures to the Java language. Kurian noted at the time that Lambda is intended to provide a more concise replacement for inner classes, as well as support automatically parallel operations on collections. Jigsaw is all about building modularity into the Java Virtual Machine.'"
It seems a little lean (Score:4, Interesting)
Both releases seem a little lean on features compared to Sun's release schedule. On the other hand, they're starting to run out of reasonable features to add to the language without turning it into a kitchen sink.
Re:Java Community approval (Score:2, Interesting)
The language you'll learn at uni isn't generally to learn the language - the language is used to deliver programming concepts. The language is rather irrelevant - although you'll probably be inclined to find a job that uses the programming language you've learned. Search around and find a different language you like (possibly also OO if you're just starting out) and do your stuff in java for uni, and then try and do it again in the language of your choice.
Java at uni is just the train. But considering your name, and the fact you called it uni and not college, and that you're learning java, I could take a pretty good stab at which uni you're going to ;)
Re:Java Community approval (Score:3, Interesting)
It's hilarious how clueless you and most of Slashdot are. At Google, we're actually writing more Java code than ever, and Python is slowly being phased out. Pretty much all of the big companies in the area are consolidated almost entirely on a mixture of C and either Java or .NET. Python and Ruby are basically relegated to simple CRUD web applications where performance doesn't matter and threading is inconsequential. While Java is a pretty bad language, Python and Ruby aren't anywhere near being able to compete with it because all of the usable implementations are terrible. CPython, MRI and YARV are garbage, and it'll take years before they reach an acceptable level of performance and remove the GIL. In fact, once InvokeDynamic is added to the JVM JRuby will be the best Ruby implementation by a pretty big margin...
Re:Go Java Go (Score:3, Interesting)
Macros in Lisp were introduced in the mid-1960s and are a powerful way to extend that language. However, the syntax of Lisp is very regular, so adapting the power of the prefix notation of Lisp into a language with a procedural syntax like Java is not going to be too easy.
I'm a little surprised that there isn't more mention of Lisp in this thread, considering that the lambda calculus that it was built on is the source of the name for one of the language projects.
Being able to transparently extend your language is a powerful tool that Lisp exploits to full advantage, provided the programmer knows when to use them. The regular syntax, functions as first-class objects (treated the same way as variables), and the macro system are the three features that build upon each other to make it such a flexible language.
See footnote #5 for some elucidation, although I certainly didn't learn Lisp on my first try: http://gigamonkeys.com/book/macros-standard-control-constructs.html [gigamonkeys.com]
Re:Go Java Go (Score:1, Interesting)
It seems like a repeat of C++0x lambdas to me. Introduce a new unnatural syntax because of fear in breaking old code. I'm sorry... but even coming from a C++ fanboi, that's a horrifying way to design a programming language.
Re:Go Java Go (Score:4, Interesting)
The funny thing about the great flexibility that the frameworks like Spring provide is that you are defining the functionality in the XML files instead of the code, but now you have to learn two languages. The nestable list structure of Lisp is almost the same as the hierarchical format of XML, and in fact, that is how they are often represented natively in Lisp XML parsers. Instead, you could just use one language, structure your data properly, and extend the language to fit your problem.
Re:Closures? (Score:4, Interesting)
Spoken like a true Blub programmer [paulgraham.com]. Trying to go from a programming language that has true lexical closures like Ruby to a language like Java which doesn't is extremely painful. You get used to being able to write code that uses higher-order functions (and hence closures) to get stuff done.
Re:It seems a little lean (Score:3, Interesting)
None of these things would actually affect the byte code but they would make the language more tolerable, less verbose. Some of these things are making their way into Java 7 / 8 (e.g. project coin work fixes language issues including resource management) which is good, but frankly the pace of development sucks. The process is so glacial that it has disappeared up its own arse and done several loops by now.
Re:Why the fuck bother (Score:3, Interesting)
No, it's not because of too much FP. It's because Scala has some really weird stuff in it, such as implicit parameters [scala-lang.org] (where values are conjured out of thin air if not explicitly provided).
Or, say, implicit type conversions [codecommit.com] for the left side operand of "." (receiver) - so in "a.b", if the type of "a" doesn't have member "b" in it, the compiler will look for all accessible conversions from "a" to something else which does have "b".
This kind of stuff means that you can be looking at one simple line of code, which actually does a lot more than you think it does due to all the implicit stuff happening behind the scenes. What's worse is that the above is possible even when you have just wrote that line.
Re:Java Community approval (Score:3, Interesting)
Well my experiance is developing on windows and linux. Testing on linux. Deploying on various different Sun boxes some sparc 8 and 9's and some T1000 and T2000. More recently the code was deployed on a series of intel based blades (installed by IBM) in a new data centre. So yes just being able to do that makes java work well.
Re:Java Community approval (Score:1, Interesting)
At Google, we're actually writing more Java code than ever, and Python is slowly being phased out.
That's interesting. I had my first phone interview with Google last week, and the recruiter was enthusiastic when I said that Python was my primary language.
Re:Elephant in the room? (Score:4, Interesting)
Please, no.
Reified generics at the JVM level has unintended consequences for other language implementations targeting the JVM.
Ola Bini has an excellent take on why it's best to keep reified generics out of the JVM.
http://olabini.com/blog/2010/07/questioning-the-reality-of-generics/ [olabini.com]