related link
Neal Gafter
neal at gafter.com
Tue Feb 9 13:05:26 PST 2010
On Tue, Feb 9, 2010 at 12:51 PM, John Nilsson <john at milsson.nu> wrote:
> The idea behind the try syntax thing was that the macro would inject the
> code blocks at the points where the client used break/continue/return but
> keep the actual control transfer (in relation to the defined block). A
> slight modification to standard Java might be required to allow breaks and
> continues from any block.
>
> Both break and continue jumps to the end of the block and triggers the
> behaviour specified by the macro. return returns from the method where the
> block was declared but triggers the trapped behaviour.
>
> Using the try-syntax I was trying to appeal to the known semantics of
> finally-clauses.
>
I think it would be instructive to see how the concurrent loop would work.
<
http://gafter.blogspot.com/2006/10/concurrent-loops-using-java-closures.html
>
<http://markmahieu.blogspot.com/2008/08/for-eachconcurrently.html>
How would you do this using the macro scheme?
-Neal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20100209/4a83f8f3/attachment.html
More information about the closures-dev
mailing list