On 10/20/07, Charles Oliver Nutter <[EMAIL PROTECTED]> wrote: > Neil Gafter: I recall you advocating non-local returns, but I don't > remember if you also advocate other types of non-local flow control like > break or continue. Do you?
Yes, but the way it is specified in http://www.javac.info, you'd want to declare and invoke the "each" method with the "for" qualifier, otherwise it isn't a matching target for the break. The invocation syntax would then be for myList.each(String element :) { if (element.equals("foo")) break; } for a member method, or for each(String element: myList) { if (element.equals("foo")) break; } for a static method. I'm working separately on a spec/implementation of extension methods, which roughly speaking would allow you to use these forms interchangeably. In other words, to take advantage of this you wouldn't have to make changes to the Collection interface (interface changes break backward compatibility in Java). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" 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/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
