Namespaces (was: Re: [ANN]A plan for 3.8/4.0... (insertdrumroll here))

Andreas Raab andreas.raab at gmx.de
Fri Apr 2 11:18:40 UTC 2004


> As andreas says you do not have to be aware of them.
> Then in addition we could avoid/forbid to have to express
> them using ::. You do not need that explicit reference in fact.

You are right, you don't need them - you *want* them ;-) Simply because it
allows you to describe certain critical relations. Let's say I want to
provide a simple end-user scripting environment, where for example, the user
has by default no access to classes like Compiler, ClassBuilder etc. Yet, at
some point you *do* have to use these guys or else you can't compile
anything. You have two choices:
a) "Import" all of them, e.g., make these guys globally accessible, spoil
the end-user namespace by exposing it directly.
b) Explicitly qualify the name, e.g., make it "deliberately obscure in the
end-user space" to keep it out of the user-visible set of names.
I vastly prefer the latter.

Cheers,
  - Andreas




More information about the Squeak-dev mailing list