The Details of Oracle's JDK 7 and 8 'Plan B'
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.'"
Is there still a Java Community left to approve this? I thought Oracle had managed to alienate them all over the past 6 months.
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.
I do not fail; I succeed at finding out what does not work.
You mean the emergency birth control pill? Well Java does feel like it was aborted these days.
There's no -1 for "I don't get it."
Oracle owns Java now?
When did this happen?
The JVM is fast as hell these days. This line about java being slow is old news and no longer true. I say this as someone who does not really like java and tries to avoid Oracle products whenever possible.
Considering COBOL still has a presence in the Enterprise world I really doubt Java will go away that fast. If they went maintenance only today, maybe in 10 years it would start to be phased out in the Enterprise and maybe gone in another 25 years.
I think the focus on closures is a fad. The concept has existed for decades, but suddenly if Java doesn't have them it's incomplete? Strangely, I don't think the lack of them has ever stopped a program of mine from working. So this seems like more of a pissing contest with C# than a feature anyone is really clamoring for.
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
fair.org counterpunch.com truthout.com indymedia.org salon.com
eff.org guerrilla.net debian.org gentoo.org
Fix the generics. Get rid of erasure and all its associated idiosyncracies and gotchas, and bring generics properly into JVM level.
Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
Just take this call it Java 9 or some such, and fire the remaining Java compiler people. Keep the VM people. There, solved it for you Oracle.
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.
fair.org counterpunch.com truthout.com indymedia.org salon.com
eff.org guerrilla.net debian.org gentoo.org
If you had to do J2EE developement prior to EJB3, you would appreciate annotations. Basically a lot of the stuff from XML files went to annotations.
For starters, to provide some context, here is the current text of Project Lambda proposal - it's a fairly short and readable document explaining both syntax and semantics. Here is the mailing list.
Project Lambda. The proposed syntax needs to be more Java-like.
There's a load of issues with semantics as well. They carried over a bunch of limitations from anonymous inner classes, such as inability to capture mutable locals (though at least you don't have to slap "final" on everything now, that will be inferred) - so it's still not true closures.
I was also rather disappointed by the way community input was handled in Project Lambda. Originally, it was unclear why they started it from scratch when there were as many as 3 major proposals for lambdas already (BCGA, CICE, FCM) which could be used as a base. The original claim was that community is too divided on those, and so a "clean slate" effort, guided by feedback of all interested parties, would reach a more universally accepted solution. What happened instead is that, after a lot of discussion on syntax and semantics, Sun - er, Oracle - just published their own spec and started to implement it right away. Pretty much all feedback on that was either quietly ignored, or disregarded under various reasons. This concerns both syntax and semantics.
With syntax it was especially disconcerting. Originally, there was a lot of discussion focusing on syntax on the mailing list, so Sun/Oracle folks declared a moratorium on it, saying that it's "not so important" and that "we can discuss it later", after semantics are figured out. Since then, their proposals have had a major unilateral revision of syntax, and that is seemingly final for the proposal given that it's what they plan to submit for JCP. So the syntax was effectively not discussed at all in any way that made a difference, even officially.
The only case of feedback on semantics seemingly making any difference was with respect to lexical scoping of identifiers in the lambda. Consider this code:
The question at hand was about what "this.foo" in the lambda body is supposed to mean. The original Sun/Oracle proposal wanted to have the same rules as for anonymous inner classes; in this case, since the lambda is an instance of SamType, this would mean resolving "foo" to SamType#foo on the lambda itself, and you had to write "this.Test.foo" to get the other one - again, same as with AICs. After a lot of negativity on the mailing list, they've changed it to use strictly lexical scoping - so "this.foo" now refers to Test#foo.
However, even in that case the attitude was interesting - when discussion started on the mailing list, Sun employees were quite dismissive of any criticism, and their response pretty much boiled down to "we believe users who're used to AICs will want lambdas to behave the same". Then suddenly they release a new spec with updated semantics, and no comments as to why they changed it, disregarding their own past arguments in favor of the old one.
So, as far as "community participation" goes, I'd say that Project Lambda has largely been a failure so far. We'll see if it favors any better in JCP.
As to its technical merits - we'll see when it gets released, but if this happens in its present shape, then I'm afraid that it is rather deficient to all competitors out there (Scala, C#...). Aside from capturing mutable locals, one other major issue that goes unresolved is that they had discarded first-class function types, so you have to make do with SAM ("single abstract method")
Whenever people talk about the JVM being fast, what they really mean is that it's fast when it's already running, and when one compares programs whose typical running time is much longer than all that extra overhead so that it can be amortized.
That's great as it goes, but it's no C++ when performance really matters.
For a growing complexity in a certain problem domain, the border between configuration and the creation of a domain specific language becomes rather thin.
Definitely. We used to call it "PPL" - Property-file Programming Language - the tendency for simple name-value property files to acquire strange little bespoke syntaxes and nesting structures. The question isn't whether you will do it - it's how soon you face it and how elegantly you'll achieve it.
The documentation is still there. And as for me, I like the documentation of .Net much more than Java's. For example have a look at the documentation of .Net's List<T>.Add() method, that includes detailed explanation of the method, its time complexity, example usage and links to the same method in other versions of .Net. Compare that to the documentation of ArrayList<E>.add(), which is little more than one line.
Java can never start as fast as C or C++, it cant be done. I needs to start all kind of housekeeping threads, and allocate different memory pools etc.
But it is true that in a theoretical reasoning that Java execution speed can be faster then C++, and thats cause the JIT may rearrange and optimize the bytecode during runtime, to take advantages of a specific hardware in a way that you may not do in C++.
More often It goes slower tho, cause we all know when we stop coding features in, its when the good cases goes through. Why would you continue then? The JIT works and that's about it. It has some optimizations thats cool, but I'm not sure it such a huge feature for selecting Java over C++.
The reason for selecting Java over C++ more tend to be that its like writing Object Oriented Basic, Java is simple. C++ is a bullet in the foot compared.
Does that even matter? Java is most used in long-running programs, not programs that are starting many times a second. The startup cost is minuscule. Focusing on startup cost is as pointless as these reviews of linux distros that concentrate on how fast the distro boots. No one is sitting there rebooting over and over saying "look at how productive I am now."
Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.