2 ms·
What you really want are continuations.
by jrockway 17y ago
What you really want are continuations.
- arketyp 17y agoPardon my presumed ignorance, but how is that?
- jrockway 17y agoYou implement your loop macro such that it binds some variable to a continuation, that when invoked, exits the loop. Then when you want to exit the loop, you invoke the continuation. (Loop exits, exceptions, returns from functions, etc. are all special cases of continuations.) This is an improvement over something like Perl's "last LABEL" statement, because you can pass the continuation around and exit the loop from anywhere you desire.
- Hexstream 17y agoOverkill. Something really simple like Common Lisp's block/return-from would do...
- bkudria 17y ago...built on top of proper continuation support.
- deleted 17y ago[deleted]