[squeak-dev] SmalltalkImage current vs. Smalltalk
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Tue Mar 2 15:41:52 UTC 2010
2010/3/2 Stéphane Rollandin <lecteur at zogotounga.net>:
>> As noticed by Ronald, the main problem with SmalltalkImage is that it
>> does not represent any Object indeed...
>
> It represent some meta-information about the Smalltalk system, aspects of
> the system seen from outside so to say. It can not really be an object
> semantically on par with the others, but that information must be provided
> somehow.
>
Hehe, I notice you used this idiom (Smalltalk system), rather than
this one (SmalltalkImage current).
This is not neutral :)
I would prefer the former too ;)
See for example, Dolphin has:
Smalltalk developmentSystem -> a SmalltalkSystem
Could they have a Smalltalk deploymentSystem ?
In the same time, they have a rather clean SystemDictionary.
VW, with namespace changes completely cleaned Smalltalk too (it's just
a NameSpace).
Utilities are spreaded around a bunch of classes (apart Smalltalk
version for portability).
Personnally, I was bred with st80 (Browser browse...), not those
(SystemNavigation default browse...) and it sometimes still bugs me ;)
...
> AFAIC I see no actual problem here, better a question of taste concerning
> where the meta-info should be stored and how it should be retrieved.
>
>> Though, when I see code like (Smalltalk cleanUpUndoCommands), ...
>
> That's the user (that is, the outside) ordering the system to do something.
> It fits in my view of what SmalltalkImage represents.
>
> Concerning Andreas question, I would keep globals in Smalltalk (since it is
> the SystemDictionary) and put everything else in SmalltalkImage that I would
> rename Squeak because it's nicer (and also because the image is only a part
> of the system, along with the VM for example).
>
> Or we could just reify everything, and have classes Image, Changes, Sources,
> VM, Platform, User... why not ? we already have DisplayScreen ("There is
> only one instance of me, Display. It is a global and is used to handle
> general user requests to deal with the whole display screen."). It could be
> fun.
>
As I said, (Smalltalk vm parameterAt: ) would not shock me.
Of course, replace first all these (vmParameterAt:
obscureCodeForGurus) by more explicit message ;)
What idiom do we have in use by now ?
- The globals:
Smalltalk keys sort reject: [:e | (Smalltalk at: e) isBehavior]
#(#ActiveEvent #ActiveHand #ActiveWorld #CustomEventsRegistry
#Display #ImageImports #Processor #References #ScheduledControllers
#ScriptingSystem #Sensor #Smalltalk #SourceFiles #SystemOrganization
#TextConstants #Transcript #Undeclared #World)
- (SomeClass current)
(Smalltalk classNames asArray sort select: [:e | (Smalltalk at: e)
class includesSelector: #current])
#(#BitBlt #CPUWatcher #ChangeSet #ColorTheme #Locale #LocaleID
#NaturalLanguageTranslator #Project #ReleaseBuilderFor3dot10
#ResourceCollector #ServiceRegistry #SmalltalkImage #SystemVersion
#TestResource #WarpBlt)
I omit #( #DateAndTime #Time #TimeStamp #Timespan #Year )
- (SomeClass default)
(Smalltalk classNames asArray sort select: [:e | (Smalltalk at: e)
class includesSelector: #default])
#(#AbstractSound #AppRegistry #Beeper #BorderStyle #Categorizer
#Clipboard #FMSound #FileDirectory #FontChooserTool #HTTPLoader
#Imports #InputSensor #InstallerUniverse #MCCacheRepository
#MCRepositoryGroup #NaturalLanguageTranslator #PackageInfo
#PackageOrganizer #PluckedSound #Requestor #SMSqueakMap
#SecurityManager #SystemNavigation #TTCFontDescription
#TTFontDescription #TextConverter #TextStyle #TimeZone #ToolBuilder
#UIManager #UUIDGenerator #UnloadedSound #WeakRegistry)
Nobody would bring back all corresponding methods in SystemDictionary
I presume...
Nicolas
>
> my 2 cents...
>
> Stef
>
>
>
>
More information about the Squeak-dev
mailing list
|