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

Juan Vuletich juan at jvuletich.org
Tue Jul 30 06:57:46 CDT 2013


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). 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



More information about the Cuis mailing list