However we call it, I know this: 1) The ability to write your own language extensions a.k.a. Control Abstractions is powerful, and
2) For that to work right, return, this, super, break, and continue all need to be transparent. I heartily echo Stephen's thoughts that control abstraction and simpler syntax for what we used to do with anonymous inner classes are separate things. Its one of the reasons why I really don't like BGGA's universal take on it: BGGA is downright awkward when you just want to create, say, an event listener, or a comparator. It creates an awesome new level of potential by way of making control abstractions very easy to write, but it doesn't really address any existing code - you'd have to rewrite everything. On Jan 17, 4:19 pm, James Iry <[email protected]> wrote: > Actually, you can repair CICE in terms of TCP by appealing to fairly > ordinary lexical scoping rules. The idea is that you say that return > is a one-shot continuation that is implicitly received by any method > or function. Thus lambdas mask the meaning of "return" in their > enclosing scope because their closures will receive their own "return" > continuation as implicit arguments. > > The nice thing about that interpretation is that it says that in this > regard there's nothing special about a method as compared to a nested > function/lambda. The non-local return case says that closures are > fundamentally different in that methods receive the implicit "return" > continuation and while closures only capture it from the enclosing > scope. > > So I can argue against an appeal to TCP based uniformity by saying > that it violates a different kind of uniformity. > > IMHO, TCP is the weakest of Gafter's arguments. The power over control > flow is the real argument. > > On Jan 15, 1:20 pm, Ben Schulz <[email protected]> wrote: > > > Heh? Breaking out of/returning from within loops, I thought that's > > what's being discussed?? > > > Reinier: The second difference should be that "CICE violates Tennent's > > Correspondence Principle while BGGA does not." That is not only more > > concise, it is also more accurate. > > > With kind regards > > Ben > > > On 15 Jan., 18:41, "John Nilsson" <[email protected]> wrote: > > > > Actually, what is the use case for long returns? What would you like to do > > > with it? > > > > The examples I can come up with is better solved with tail recursion... > > > > BR, > > > John --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
