On Mon, Sep 12, 2011 at 2:15 PM, Tom Hawtin <[email protected]> wrote:

> On Sep 12, 4:05 pm, Cédric Beust ♔ <[email protected]> wrote:
>
> > Jave has indeed had closures since day one (e.g. Runnable, Callable,
> > etc...). If you're not convinced, ask yourself the following question: is
> > there any programming construct that you will be able to do in Java 8
> with
> > closure support that you can't do today with Runnable?
>
> Is this the point in the conversation where we hit Turing-
> completeness?
>

No, that would be a cop out :-)

Java 8 will allow us to replace

foo(new Runnable() { public void run() { blah(); } })

with

foo( => blah())   (approximately)

These two constructs are extremely similar, and I think the former would
definitely qualify as a closure to me, at least in spirit, if not literally.

-- 
Cédric


> > None.
> >
> > The syntax will be nicer, but that's all Java 8 is adding in that area.
>
> Syntax is terser (nicer, I'm not so sure I'm willing to absolutely
> commit to that) than 1.1, but there is also an alleged lighter
> implementation available with method handles (alleged as the
> optimisation may perhaps be harder and heavier).
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "The Java Posse" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/javaposse?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to