Re: Java 8 Lambda binary snapshot



markspace wrote:
Lambda dev and the compiler group (and possibly others) published a
binary snapshot of the current state of lambdas and closures for Java.

http://jdk8.java.net/lambda/

My advice is that all Java developers should be watching this very
closely. It's pretty much the future of Java development.

I'm also looking for tutorials and other information on programing
lambdas and closures, so if anyone wants to help with that I'd
appreciate it.

Here's a couple I found:

<http://www.parleys.com/#st=5&id=2170&sl=2>

<http://www.parleys.com/#st=5&id=2632>

I also found this book at the library and it seems to be excellent:

<http://www.amazon.com/Patterns-Parallel-Programming-Timothy-Mattson/dp/0321228111>

I look at Java closures as just syntactic sugar for anonymous interface implementations, and conversely, as anonymous interface implementations as a poor-man's closure.

This has two advantages. It keeps me out of the purist's dilemma, meaning I don't care that these aren't "real" closures. It provides a simple mental model for how to use them.

That said, it helps to be at least somewhat aware of lambda calculus and the theory and practice of "real" closures to provide a motivating mental model.

The Java perspective that closures boil down to SAM (single-abstract method) interface implementations makes it easy to reason about what they do.

--
Lew
.



Relevant Pages

  • Re: Wozu Closures =?ISO-8859-15?Q?f=FCr_Java=3F?=
    ... Ich bin nicht begeistert von Closures, ich sehe nichts, was mit Closures machbar ist, was heute nicht schon so in Java machbar ist. ... Person person, String ann, String key) { ... Statt den Code irgendwo zu haben, hast du ihn dort wo du ihn verwendest. ...
    (de.comp.lang.java)
  • Re: operator overloading
    ... One of the best things about python, one of the things that meant i never looked back when i switched to it from java, was the existence of lambda expressions, functions as first-class objects, and higher-order functions. ... Bloch had a presentation a while back on why closures and Java don't mix; I myself was irrevocably convinced that they were a poor idea when I saw that "return" and "return;" would mean different things under the BGGA proposal. ... FOR LIFE or until we change the language for something different. ... But there's a difference between one proposal being duff and the whole idea being duff. ...
    (comp.lang.java.programmer)
  • Re: Passing a method(reference) to an other method and calling the method.
    ... but i hear closures are to come in one of the next Java ... It also appears that a majority of Java developers are at best indifferent to it or even downright hostile. ... Years ago Sun put out a white paper about why they chose anonymous classes over delegates. ... I do like the anonymous class idiom, and various other places where Java uses subtypes to do what closures or delegates would. ...
    (comp.lang.java.programmer)
  • Re: The Closure Controversy
    ... overhaul the language, fixing the fundamental problems first and, if you do ... pure functional programming cannot succeed in Java: ... But Bloch also points out that closures seek to solve several problems in Java: ...
    (comp.lang.java.programmer)
  • Re: OO compilers and efficiency
    ... >> it's OO, it's because it's Java. ... > The representation of closures in C++ is very similar to that in Java ... >> is as a freshly-allocated chunk of memory with references to the ... > I'd expect SML and OCaml to be up to 5x faster than Java. ...
    (comp.programming)