When is a closure a real one? [was: Real closures]
Mathieu
mathk.sue at gmail.com
Sun Oct 8 09:26:00 UTC 2006
Klaus D. Witzel a écrit :
> Thank you Mathieu and Phillipe for you pointers and example.
>
> Just out of curiosity (and as input for writing accurate yes/no test
> cases :) let me ask what is expected by the community (apologies if this
> sounds like a silly question ;-) when is a closure a real one:
>
> 1] after #fixTemps (or equivalent)
no
>
> 2] after #blockCopy: (is this equivalent to 1?)
no and it's not equivalent to 1. In fact blockCopy create a BlockContext.
And a BlockContext is not a closure, it's more like MethodContext. See:
http://users.ipa.net/~dwighth/smalltalk/bluebook/bluebook_chapter27.html#Contexts27
>
> 3] after #createBlock: (is this equivalent to 1? to 2?)
Yes and in a way it can be equivalent to 1 plus 2.
>
> 4] <put: your requirements: or thoughts: here>
>
> Thank you for your time!
>
> /Klaus
>
More information about the Squeak-dev
mailing list
|