SystemDictionary>>imageImports -> XXX>>imageImports
Martin Wirblat
sql.mawi at t-link.de
Mon May 12 20:00:13 UTC 2003
Hi Stephane
Stephane Ducasse <ducasse at iam.unibe.ch> wrote:
> Hi
>
> I would like to remove imageImports from SystemDictionary. Is there
> any places you think
> that could be good to move the functionality. I was thinking to
> create a new class
> Imports not limited to images.
>
> so that we could do
> Imports default viewImages
and:
> We should avoid as much as possible global. also
> I have to remember ImportImage is an instance of Imports, Smalltalk
> is an instance of SystemDictionary....
>
> For Imports I put stuff on the instance side because different
> image/environments could want different
> imports.
We should avoid creating many new artificial classes too.
Look at it from the perspective of language ( as in human language
which our brains speak when we program ): 'Smalltalk viewImageImports'
makes sense, you are talking to your image and requesting information
about it. So you know where to look for such methods. OTOH no one will
sift through all classes to find useable but hidden functionality in
hidden classes like Xxx>>yyy ( you don't know the selector by then ).
One 'super' global like Smalltalk will make no problems at all: All
possible images can contain this single one ( at least ? ) instance of
SystemDictionary. To avoid references to Smalltalk - as you once
demanded - gives you nothing, or am I missing here something ? Instead
it should help you to replace hard coded globals, which btw don't have
to be problem in a well engineered module-system.
SystemDictionary>>imageImports is right now only a lookup in the
dictionary. Do you want to create a second dictionary which holds only
imports ? If so, isn't this more complicated ? If not so, isn't it
more complicated too to delegate the lookup to Smalltalk ?
regards,
Martin
More information about the Squeak-dev
mailing list
|