Comments on Smalltalk block closure designs, part 1
Anthony Hannan
ajh18 at cornell.edu
Wed May 2 14:23:42 UTC 2001
I think Allen's design is more "correct" for independent blocks.
I for one would like to see a block contain its own bytecodes as well as
literal references and a reference to the shared environment between the
block and its home method. Blocks would be just like mini CompiledMethods.
This design would simplify my distributed computing design. For example, if
I have a proxy to a remote collection in another image, I would like to be
able to do "collectionProxy select: [:person | person lastName = 'Smith']".
This would cause the select: message to be sent over the network to the real
collection and executed there. But what components of the block argument
should I send over? If the block's bytecodes are in the original compiled
method (like current Squeak) then I have to copy the home context and the
compiled method over. But if the block can stand on its own two feet that I
don't have to copy any other objects over and it can have a back pointer
proxy to any shared environment.
-Anthony
More information about the Squeak-dev
mailing list
|