[BUG][FIX] DeclarativePools ([er] [et] looks good)

Avi Bryant avi at beta4.com
Thu Jun 19 22:52:30 UTC 2003


On Wed, 18 Jun 2003, Tim Rowledge wrote:

> > > After a couple of minor reworks, the latest version of the declarative
> > > pools code is
> > > http://sumeru.stanford.edu/tim/pooters/SqFiles/deltas/
> > > DeclarativePools-5
> > > .sar

> We still need some thirdparty review of this

I read through the code in DeclarativePools-4.sar (note that I couldn't
find a DeclarativePools-5.sar).  The changes are clean, sensible, and
fairly contained.  I didn't see any problems in the code, and I think
it solves an important problem.  I am not a harvester, but I am strongly
in favor of including it.

I was able to file the code into a recent (5269) 3.6a image.  Everything
seemed to work as advertised.

The one reservation I do have is that the implementation of SharedPool
class>>bindingOf: means that adding instance methods to a subclass of
SharedPool is essentially impossible, and a user will get strange errors
if they try.  For example, I tried defining the method

GZipConstants>>foo
  ^ Point

Accepting this method gave me "Unknown variable: Point"; I told it to make
Point a global, which led to a failure when trying to store into a
ReadOnlyVariableBinding.  This could be confusing for those who haven't
looked deeply into the implementation of SharedPool.

However, since pools are rarely used by new users, I would be in favor of
including these changes anyway, and adding better error messages for this
case in the future (for example, by explicitly disallowing any
instance-side methods to be added to SharedPools).

Cheers,
Avi



More information about the Squeak-dev mailing list