On Fri, Dec 2, 2011 at 10:55 AM, Mariano Martinez Peck <
marianopeck@gmail.com <mailto:
marianopeck@gmail.com>
> wrote:
� �Thanks both. I am right to assume that if the block refers to temp
� �vars, parameters, or whatever in another scope, then such solution
� �won't work. I mean, if I have this example for example:
� �| bytes result blah |
� �blah := 42.
� �bytes := FLSerializer serializeToByteArray: (SortedCollection
� �sortBlock: [:a :b | (a + blah) > b ]).
� �Then the 'blah' is in a different context. So the mentioned
� �solution works for "clean" closures, which are "self contained".
� �In the other cases (such as this example), we should serialize the
� �whole stack. Is this correct?
No. �The closure implementation arranges that any and all temporary variables accessed by the closure are directly accessible from the closure without accessing the outer contexts.
�...