[Cuis] [Philosophy] Do we need pool dictionaries?

Frank Shearar frank.shearar at gmail.com
Tue Jul 30 07:28:16 CDT 2013


On 30 July 2013 12:57, Juan Vuletich <juan at jvuletich.org> wrote:
> Hi Casey,
>
>
> On 7/30/2013 7:49 AM, Casey Ransberger wrote:
>>
>> This is something I've wondered about for awhile. I understand that pool
>> dictionaries are convenient in uncommon cases. What I'm wondering, though,
>> is whether or not we really need them.
>>
>> Does using pools give us a performance gain? (I'm guessing it does.)
>>
>> I can't think of an analogue to them in any other language I've used,
>> though. I can't imagine that they're actually necessary unless there's
>> something about Smalltalk that I don't understand (and I'm quite certain
>> that there must be lots of things about Smalltalk that I don't understand
>> yet!)
>>
>> It seems like there could be some upside to ripping the entire concept
>> out. OTOH if I had a pile of cash I'd hire some folks (you know who) to
>> build out optimistic inlining in Cog and then rip out the concept of classes
>> too, so of course I'm a bit of a radical. Call me an essentialist;)
>>
>> I wonder what folks on the list would think if I undertook the probably
>> huge task of eliminating them. I've been eyeing that prize. And of course it
>> would be fabulous to know why it's a bad idea if it's a bad idea.
>>
>> If its doable, I'd even go so far as to say that pools could be an
>> external package for legacy code that needs them.
>>
>> Just what's on my mind this morning.
>>
>> --C
>>
>
> Hi Casey,
>
> I don't like pooldictionaries. They look like "hidden globals" to me, and
> they are as bad as regular globals. Maybe there were good reasons for them
> 30 years ago, but I don't see any today, except for compatibility.
>
> Cuis base image doesn't include any pool dictionary. See 'Smalltalk
> poolUsers' (unfortunately broken in Squeak).

No more! Environments-fbs.22 fixes it so you can say `Smalltalk
globals poolUsers`, which says, in the "base" 4.5,

 a Dictionary(#BalloonEngineConstants->an
OrderedCollection(#BalloonEngine an OrderedCollection())
#ChronologyConstants->an OrderedCollection(#Date #Week #DateAndTime
#Time #Duration #Month #TimeZone an OrderedCollection())
#CustomEventsRegistry->an OrderedCollection(an OrderedCollection())
#EventSensorConstants->an OrderedCollection(#KeyboardInputInterpreter
#DisplayHostWindow #MorphicUnknownEvent #EventSensor #UserInputEvent
#TextConverter #HandMorph an OrderedCollection()) #GZipConstants->an
OrderedCollection(#GZipWriteStream #GZipReadStream an
OrderedCollection()) #ImageImports->an OrderedCollection(an
OrderedCollection()) #MCMockAPoolDictionary->an
OrderedCollection(#MCMockClassB an OrderedCollection())
#References->an OrderedCollection(#Player an OrderedCollection())
#SharedPool->an OrderedCollection(an OrderedCollection())
#TextConstants->an OrderedCollection(#DisplayText
#LimitingLineStreamWrapper #MultiTextComposer #MultiNewParagraph
#TextLine #CharacterBlock #TextAlignment #SegmentScanner #HostFont
#StrikeFont #TextLineInterval #CompositionScanner
#PostscriptCharacterScanner #Text #MultiCharacterScanner #TextStyle
#CharacterScanner an OrderedCollection()) #Undeclared->an
OrderedCollection(an OrderedCollection()) #ZipConstants->an
OrderedCollection(#ZipWriteStream #ZipEncoder #DeflateStream an
OrderedCollection()) #ZipFileConstants->an
OrderedCollection(#ZipArchive #ZipArchiveMember an
OrderedCollection()) )

frank

> Squeak includes
> ChronologyConstants, EventSensorConstants and the old style (non SharedPool
> subclass) TextConstants. I cleaned all these in Cuis. Right now there are a
> couple of them in the external Compression package. (I had to tweak package
> saving to ensure saving pools prior to users for it.) But we'd clean them as
> well. They can usually just be replaced with class variables.
>
> What I mean is that in Cuis we can already make SharedPool optional. Feel
> free to make it happen, I'll integrate it.
>
> Cheers,
> Juan Vuletich
>
>
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



More information about the Cuis mailing list