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

stéphane ducasse ducasse at iam.unibe.ch
Fri Apr 2 12:31:49 UTC 2004


On 2 avr. 04, at 13:18, Andreas Raab wrote:

>> 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.

It depends what is your audience. I prefer a model that does not lie in 
my back.
But I can understand that if you are building an environment for 
scripters or novices
you do not want to pollute them with unnecessary symbols. In Classbox
we took the decision to have transparency but for a full programmer 
audience.

Stef




More information about the Squeak-dev mailing list