explicit return from a block

Damien Cassou damien.cassou at laposte.net
Tue Jun 27 07:44:19 UTC 2006


Viktor Svub a écrit :
> Is there any way to explicitly return from a BlockContext/BlockClosure
> (like ^some-expression in methods) but without returning from the parent
> context (method)? I'm beginning to figure out how to avoid the need for
> "break&continue" in loops, and i know that i can even avoid the need for
> explicit return converting the block in question in a method, but there
> are places where a long block is much more convenient...
> thanks

Hi, I don't know if it is possible, but most of the time, when I need 
it, it is a sign that I do not use the good abstraction. For example, I 
need to replace #do: by #detect: or things like this.



More information about the Squeak-dev mailing list