AW: [modules] Top 10 ways in which the modules system sucks

Henrik Gedenryd h.gedenryd at open.ac.uk
Thu Jan 31 16:17:42 UTC 2002


Andreas Raab wrote:

> Henrik,
> 
>> Just to anticipate a certain category of comments ;-)
> 
> You forgot the #1 issue: Filing in old classes is broken ;-) I got a DNU
> attempting to file in a class which probably wasn't quite module clean.
> Here it is:
> 
> Object subclass: #MumbleObject
> instanceVariableNames: ''
> classVariableNames: 'MumbleClassVar'
> poolDictionaries: 'TextConstants'
> category:'Foo-Bar'!

My guess is that this is because Pools don't exist any longer :-/ because
they are unnecessary and Modules can do the same thing in a better way.
TextConstants, and the other pools, are now Modules. You can send the
messages.

The second most probable cause is that you found a bug.

Now you don't really need to have TextConstants as a pool var, do you? ;-)

1. Send messages to TextConstants to get the definitions: "NewYork" -->
TextConstants NewYork, or 2. In the preamble to your file, create your
module and declare TextConstants as an external module.

(Module fromPath: #(Foo Bar) forceCreate: true)
    externalModule: #(<...> TextConstants) alias: nil version: nil
importNames: true.

This is handled automatically by the module fileOut/storage system. 2 is the
right way to do it but a slight nuisance to hack this way.

>> - Things are probably broken in the existing code base. Some
>> parts most certainly are broken: Alice/Wonderlands use pool variables
>> in a way that really isn't supposed to work, now it propbably doesn't.
> 
> I'll fix that if you can give me a few hints at what to look for.

Alice and Wonderlands use pool variable names that are *lowercase* and they
insist that the names should be Strings, not Symbols. The first will work
anyway, but I did not want to hack in support for the second one, so this
will probably just break some things.

>> - Image modularity. I have only been able to make the
>> VMConstruction module, and Balloon3D (almost), unloadable.
> 
> Will fix that too if you let me know what the current problems are.

I think it works ok, actually, now that I thought about it.

Henrik




More information about the Squeak-dev mailing list