[squeak-dev] Re: Environment's #classNamed:

Chris Muller asqueaker at gmail.com
Fri Dec 20 20:04:53 UTC 2013


On Fri, Dec 20, 2013 at 1:33 PM, Frank Shearar <frank.shearar at gmail.com> wrote:
> On 20 December 2013 16:48, Frank Shearar <frank.shearar at gmail.com> wrote:
>> I started playing around with Environments. I thought I could do
>> something like this:
>>
>> | either |
>> either := Environment named: 'EitherEnv'.
>> [(MCCacheRepository default loadVersionFromFileNamed:
>> 'Either-fbs.9.mcz') load] on: EnvironmentRequest do: [:e | e resume:
>> either].
>> either
>
> It's possible that the above example is simply bogus - #named: takes a
> _Symbol_ parameter, not a String. (Important, because Environment
> tracks all its instances in an IdentityDictionary, and of source
> 'this' == 'this' is false.
>
> Anyway, my original question stands - should #classNamed: search
> through an Environment's references or not?

hasClassNamed: is tangential to bindingOf:; a similar type of access.
So, yes, I think it should.

And, also, let me pose an additional question:  Why do we need
'exports' at all?  The use-case we're solving is name-disambiguation,
period.  Exports seems to be about making certain classes
"unimportable", e.g., "private".

Why are exports needed at all?


More information about the Squeak-dev mailing list