A little namespace "proposal"

goran.krampe at bluefish.se goran.krampe at bluefish.se
Thu Apr 15 21:05:18 UTC 2004


Alexandre Bergel <bergel at iam.unibe.ch> wrote:
> > And another problem is that the compilation of a method now depends on
> > the import list. So if you write method A with "Delay" (and choose to
> > import Tweak::) and then write method B which references "Semaphore"
> > (which happens to exist in Banana::, but there is also a Banana::Delay
> > !) then the tools will add Banana:: and suddenly it is not clear anymore
> > which Delay that method A refers to. In short - in Java the compilation
> > unit is the class and if you reference something that exists in two
> > different imports the Compiler will barf. 
> 
> In Java the compilation unit is a file, and not a class.

Technically yes - but in practice you typically have one class per file.
My main point though is that it is not per method.

> 
> I believe to put the import at the level is a class is wrong. A class is not a module/package. 

Yes, agree. Though I of course would like to live without imports
altogether. :)

Remember that I am aiming for a simple "don't get in my face"-solution
that covers 95% of what we need - not a much more complex solution
trying to get another 5 dubious percent. :)

regards, Göran



More information about the Squeak-dev mailing list