| From | Sent On | Attachments |
|---|---|---|
| Neal Gafter | Feb 7, 2010 9:10 am | |
| John Nilsson | Feb 7, 2010 2:50 pm | |
| Neal Gafter | Feb 7, 2010 3:36 pm | |
| John Nilsson | Feb 8, 2010 9:20 am | |
| Neal Gafter | Feb 8, 2010 11:03 am | |
| John Nilsson | Feb 8, 2010 2:44 pm | |
| Neal Gafter | Feb 8, 2010 3:34 pm | |
| John Rose | Feb 9, 2010 11:21 am | |
| John Nilsson | Feb 9, 2010 12:21 pm | |
| John Nilsson | Feb 9, 2010 12:50 pm | |
| Neal Gafter | Feb 9, 2010 1:05 pm | |
| John Nilsson | Feb 9, 2010 1:51 pm | |
| Neal Gafter | Feb 9, 2010 1:54 pm |
| Subject: | Re: related link | |
|---|---|---|
| From: | John Nilsson (jo...@milsson.nu) | |
| Date: | Feb 9, 2010 12:50:50 pm | |
| List: | net.java.openjdk.closures-dev | |
On Tue, Feb 9, 2010 at 12:34 AM, Neal Gafter <ne...@gafter.com> wrote:
On Mon, Feb 8, 2010 at 2:45 PM, John Nilsson <jo...@milsson.nu> wrote:
On Mon, Feb 8, 2010 at 8:03 PM, Neal Gafter <ne...@gafter.com> wrote: A quick and dirty pretend syntax (didn't really spend too much time thinking about concurrency, but I'm assuming that any issues can be address within the macro construct).
The problem isn't syntax, it's semantics. I don't see how your API makes return/break/continue "do the right thing" from the API client's point of view. You seem to treat break and return identically, for example, but they don't have the same meaning at all.
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.
BR, John





