[squeak-dev] To get the store string for a Block apparently send
it #decompile .
Eliot Miranda
eliot.miranda at gmail.com
Mon May 30 22:30:23 UTC 2011
On Mon, May 30, 2011 at 12:04 PM, Jerome Peace
<peace_the_dreamer at yahoo.com>wrote:
> Ricardo Moran,
>
> Thanks.
>
> Indeed, #decompile does what storeString should do for Block closures. At
> least for simple cases. Just what I was looking for.
>
Only for closures that don't close over anything.
>
> The hanging question is why can't #storeString do that?
>
It could, but only for simple cases. How much does the storeString include?
If the closure is on in a system method, does the storeString include that
method or a reference to it? storeString handles very simple cases of
self-contained data structures. Closures, by their nature (and like classes
and methods, processes, etc) are (at least potentially) extremely complex
objects, the serialization of which requires considerable flexibility as one
would find in a powerful pickling facility (see the current discussion on
FUEL). So for me the reason is that having storeOn: handle complex cases
such as closures is in conflict with the desire for storeOn: to be really
simple.
HTH,
Eliot
>
> --Jerome Peace
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20110530/2432a5ae/attachment.htm
More information about the Squeak-dev
mailing list
|