[Modules] Upper case message names for accessing modules

goran.hultgren at bluefish.se goran.hultgren at bluefish.se
Thu Feb 21 09:18:26 UTC 2002


Ok, apart from how we syntactically write direct references in the
module system I would envision this:

1. Imports are made on module level. We already have that - the neighbor
modules. I think.
2. If you type a direct reference in the code it would generate an
automatic neighbor module reference on compile. It would of course barf
if that module is not loaded (it doesn't have to be active, right?).
3. If you type a non direct reference like "EllipseMorph" then I would
like it to:
	1. If there is already ONE and ONLY ONE neighbor module exporting
EllipseMorph then do nothing. All is fine.
	2. If there are two or more neighbor modules exporting EllipseMorph
then barf and ask user to make a direct reference using whatever
syntactic means there are for that. :-)
	3. If there are no neighbor modules exporting EllipseMorph, find it
among all loaded modules and if there is ONLY ONE - add that module as a
neighbor. Ask user for confirmation. This could be a Preference.
	4. If there are more than one loaded module exporting EllipseMorph, ask
which one should be added as a neighbor.

The problem I see with all this is that we can not guarantee that the
non direct references are ok. If I add a neighbor module which also
exports EllipseMorph - which one does the old method reference now? That
could on the other hand be checked by the system - when we add neighbors
we could crosscheck the exported names and if there are overlaps we
could check if those names are referenced in the methods of the class
and if they are then we need to ask the user to either abort adding the
neighbor or change the references into direct references.

Phew. 

Well, whatever, perhaps I am "out bicycling" as we say in Sweden. :-)

regards, Göran

PS. One "value" I like is to be able to just type EllipseMorph and that
would be ok. I want Squeak to "autoimport" semiintelligently and perhaps
sprinkle it with a few confirmations based on Preferences. DS



More information about the Squeak-dev mailing list