On Dec 15, 2013, at 11:22 AM, Norbert Hartl <[email protected]> wrote:

> 
> 
> Am 14.12.2013 um 21:08 schrieb Stéphane Ducasse <[email protected]>:
> 
>>> Hi Norbert--
>>> 
>>>> Class names are globals. A class is registered in a global namespace
>>>> by its name. Names need to be looked up. How should it work in
>>>> another way?
>>> 
>>>   Get rid of globals. Make the root classes elements of the special
>>> objects array (Object already is), and look up classes through that.
>>> Make everything else that used to be a global (like Transcript) the
>>> responsibility of some class, and use them by sending messages. This
>>> also makes the modularization straightforward.
>> 
>> This is what we did with 
>>   Smalltalk -> self environment.
>>   Smalltalk -> SmalltalkImage current
>> 
>> Now I wonder if it really solves the problem that has igor (this is true 
>> that I would prefer to avoid to 
>> have specific declaration. 
>> Now what would be good is to have a protocol to systematically initialize 
>> such "global" even when they 
>> are attached to classes.
>> 
> What speaks against Package>>#initialize ?
You cannot easily build tools with this approach


> Or package having a selector returning the list of package wide globals and a 
> selector for each global to create the value for it?

would be much better

> What is the difference between a dependency to a package and the access to 
> its globals? Shouldn't the package not having defined its dependencies and 
> couldn't that mean the same information composes the "global" namespace for 
> this package? 

I could not understand what you meant :)

> 
> Norbert 
>>>   There's no need for a system dictionary. It was a profound and
>>> long-lived mistake.
>> 
>> In the midterm I want to get rid of it (by splitting it and distributing 
>> into module) but it will take 
>> time. 
> 


Reply via email to