[Modules] DeltaModules adding inst/class vars?

Henrik Gedenryd h.gedenryd at open.ac.uk
Mon Feb 25 17:30:47 UTC 2002


Stephan Rudlof wrote:

> I have a question:
> Is it planned to provide a mechanism for DeltaModules to add inst/class vars
> to a class? Not by redefining all inst/class vars, but by giving a 'delta'
> to existing ones...
> This is a feature which could be useful, if *not* used to often, of course.


Yes, if you want to implement it then you are warmly encouraged to do it.
The underwork is there, so it should be a matter of merely doing it. You can
look at the implementation of changing the global vars of a module, and
probably grab a good deal of that code. There are also unit tests for that
functionality.

> Or do you see a conceptual problem (e.g. missing encapsulation) with this
> idea?

No. Modules shouldn't break encapsulation, whereas DMs are specifically
meant to do just that, you might say.

Henrik




More information about the Squeak-dev mailing list