[Q] Modules- just classes or more?

goran.hultgren at bluefish.se goran.hultgren at bluefish.se
Wed Feb 20 14:26:23 UTC 2002


Bergel Alexandre <bergel at iam.unibe.ch> wrote:
> Hello Aaron,
> 
> > What can modules hold on to?  Only classes, or can they also contain- and
> > load and unload- arbitrary objects or (more importantly) methods?
> 
> Actually modules hold only classes definition and some other meta information.
> One good thing should be to use ImageSegment for storing module...

Well, I haven't looked into it too much yet, but a module is a namespace
and as such
it actually holds a bunch of exported names. Most of the time that would
be the classes
in the module (much like the dictionary "Smalltalk" does today) but one
example of an instance is (using the much debated syntax for looking up
names in a module):

(Module @ #(Squeak Language Collections Streams)) Transcript

And looking at the current format for module storage on file it is
normal "chunk format".
Take a look at Repository>>contentsOn: - it sure looks to me that it can
store other things too.
But looking further on Module>>variableDefinitionFor: it doesn't seem to
be implemented yet!

But I have been known to be wrong before so take this with a grain of
salt... (valid saying in nglish?) :-)

> Alexandre

regards, Göran



More information about the Squeak-dev mailing list