[modules] How to convert pools

Henrik Gedenryd h.gedenryd at open.ac.uk
Sun Feb 3 20:19:55 UTC 2002


Andreas Raab wrote:

>> Umm, there is unfortunately no simple way to do any automatic
>> conversion, but simple pool initialization code should be simple
>> to convert.
> 
> It's not initialization that bothers me. It's _using_ some existing pool
> (like TextConstants). What happens is that when you file in such a class
> (like my MumbleClass example), the file in process stores a _module_ in
> the shared pools. And then things start to get horribly wrong.

Ok I see.

>> But you won't be able to use this code as proper module code
>> anyway as pools break modularity.
> 
> I don't understand this. Why would they? Pools where the only kind of
> globals that were actually scoped across the class hierarchy in a
> halfways reasonable way, so what's the difference between using a pool
> and importing a module and why would using pools break modularity?

Like this: A globally available definition should be defined in exactly one
module. But in which module does a pool variable belong? Alsok, the module
system has a precise way of controlling access to definitions, but it cannot
control pool variables. Besides, pools are redundant now that there are ways
of collecting global values and control access to them--with modules.

Henrik




More information about the Squeak-dev mailing list