[squeak-dev] Environments question Binding>>objectForDataStream:

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Apr 1 16:30:39 UTC 2014


2014-04-01 16:02 GMT+02:00 Colin Putney <colin at wiresong.com>:

>
>
>
> On Tue, Apr 1, 2014 at 6:49 AM, David T. Lewis <lewis at mail.msen.com>wrote:
>
>> Currently we have this:
>>
>> Binding>>objectForDataStream: refStream
>>         "It's not yet clear how serialization should work in the presence
>> of environments"
>>         self shouldBeImplemented.
>>
>> A Binding seems to be a simple object. Does it really need special
>> handling
>> when serializing?
>>
>
> It does. If you write a binding out to disk and then read it back in, you
> should have the same instance you started with, and not a copy. That part
> is fairly straight-forward: we include just the key in the data stream, and
> then when reading it back in we fetch the binding using the key.
>
> For now, the simple thing is just to use "Environment current" when we
> need to lookup a binding. At some point we'll need a way to specify which
> environment to use when reading objects from disk, but that needn't stand
> in the way of getting this working again.
>
> Colin
>
>
>
>

That's just what we would need to store: a reference to an {environment.
variableName} pair, instead of a variableName.

This will raise following question : how do we refer to a specific
environment?
Are environment registered uniquely by name, or is there another kind of
known path to reach it from default environment?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140401/77f50811/attachment.htm


More information about the Squeak-dev mailing list