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

Casey Ransberger casey.obrien.r at gmail.com
Tue Jul 30 06:13:19 CDT 2013


Aha! And now you've gotten to the nebulous question mark I've been wondering about since we first heard about Environments. 

A Ruby module is nothing but a flexible namespace object, isn't it? I wrote some stuff about Environments in the original post, but deleted it before hitting send because I didn't want to conflate things or be windbaggish. 

Also, yep, I was pretty sure that other solutions would involve either message sends or compiler/vm support to avoid message sends.

On Jul 30, 2013, at 3:59 AM, Frank Shearar <frank.shearar at gmail.com> wrote:

> On 30 July 2013 11:49, Casey Ransberger <casey.obrien.r at gmail.com> 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.)
> 
> If you threw out pool dictionaries, I guess you'd have to use message
> sends to find out some value. Is that what you mean by a performance
> gain?
> 
>> 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!)
> 
> With the caveat that I've only just started looking at these guys
> (because SharedPool lives in Squeak's System package, but several
> Kernel classes use SharedPools), I'd say that they're something like a
> limited mixin, in Ruby terminology. Or, if you prefer, if you needed a
> pool dictionary in Ruby you'd use something like
> 
>  module MySharedPool
>    ONE = 1
>    TWO = 2
>  end
> 
>  class MyClass
>    include MySharedPool
>  end
> 
> frank
> 
>> 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
> 
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org



More information about the Cuis mailing list