Namespace, Package, Classbox and Local Rebinding

stéphane ducasse ducasse at iam.unibe.ch
Fri Apr 16 20:05:47 UTC 2004


> Alexandre Bergel <bergel at iam.unibe.ch> wrote:
>> Any comment appreciated.
>
> It all sounds very interesting.  Can you please expand on a few
> high-level questions?
>

I will try to reply and alex will complement

>
> Importantly, do you think you have achieved a complete solution for
> namespace issues?

I do not know because this was not our goal. Our goal was to create a
space where you would not have to bother about code not in your 
environment

Basically a classbox has a namespace inside and you only see the class 
var
defined in this namespace + the one you import. (classbox is more about 
visibility and control
of class extension than class names. So we could reimplement them on 
top of a new namespace
right now alex use Dan's environment.

> Do they help with:
>
> 	1. Letting independent modules use the same short names for a class?
	
Sure. In classbox you only see on flat space at the time and you do not 
have the percpetion
that there are other namespace. The only moment you see that is when 
you specify the import statement.

> 	
> 	2. Letting code use short names almost exclusively, instead of having
> to fully qualify a lot of things?

yes always we are always in a flat unique namespace at least 
conceptually. I write 100% normal
code there no ::
> 	
> 	3. Letting users start coding quickly?  e.g., how much overhead is
> there to create a dumb little subclass of Morph that responds to button
> clicks by opening a web browser?

The same as normal + the classbox creation (one click) and the import 
another click

> 	
> 	4. Letting users manage the system after it has been running a while
> and acreating any gunk that #3 will impose?

Don't understand.


> I do not see a way to import namespaces as a whole.  This seems bad.
We started without that possibility but this is possible if I remember 
correclty.

> How do I write code that uses Tweak classes, from outside of Tweak,
> without having to fully qualify all of my references?  Am I forced to
> import one class at a time?  Or am I expected to write all Tweak-using
> code inside a Tweak namebox?  What if I want classes from two separate
> class boxes?

You can you have to import the names you need or import all the 
classbox.

> What do you mean that they help with deployment?  I am not aware of any
> deployment problem in Squeak that can be addressed at the language
> level.  So I guess I am asking: what do you mean of deployment?
> Deployment of what and to whom?


I do not know what alex mean there.
No I'm not sure that we have the right solution. our problem was not 
name clash
but controling who was seeing the extension you were doing on other 
classes.

Then once andreas said that classboxes can be dangerous because they 
mix two
aspects names and package and we have here all kind of discussions on 
the topic
and I would not say that we have the perfect solution. We created 
soemthing and we
will start to really play with it to learn. So you questions and 
critics are welcome.

Stef

>
>
> I am sure I will think of other questions, but those seem like a start.
>
>
>
> -Lex
>




More information about the Squeak-dev mailing list