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

stéphane ducasse ducasse at iam.unibe.ch
Fri Apr 2 08:41:35 UTC 2004


Hi goran

not all the namespace are bad. Do not confuse java bad design and 
namespace.
Java package are just shortcuts. Also VisualWorks did some pretty bad 
choices: importing a namespace at the class level sucks.

Read our classbox paper (you will get soon near you a version running). 
This is a bit old now and
we got a much better paper that we can send on demand (because this is 
under submission).

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.

In classbox you have in your classbox no namespaces you have a flat 
land, you import the name
you want from other classboxes but once this is done (and the system 
can help you for that "I see
that you use TheClassBlbal do you want to import from X or Y). then you 
do not see them anymore.

In classbox we focused on how to control the visibility of class 
extensions but do not confuse everything.



On 2 avr. 04, at 10:46, goran.krampe at bluefish.se wrote:

> Hi Andreas, Avi and all!
>
> "Andreas Raab" <andreas.raab at gmx.de> wrote:
>> Hi Avi,
>>
>>> Thoughts?
>>
>> Lots of them.
>
> I have one thought that I just want to reiterate. :) When you guys are
> working on this, please keep in mind that one of the beautiful 
> strengths
> of Smalltalk is actually the LACK of namespaces.
>
> The freedom that comes with having a snippet of code meaning 
> essentially
> the same thing (disregarding temp/instvar shadowing etc) wherever it is
> run - is a good thing. I almost barfed when I discovered the 
> "scrapbook"
> in VisualAge for Java (=workspace) and that I had to tell it which 
> class
> to "run in" before I could try any code doits. Sigh.
>
> When Daniel Vainsencher visited me here in Stockholm he made me realize
> that namespaces can be done differently than how it is done in most
> other langs today. Almost all other langs seems to be using a
> "pessimistic" approach. It would be really cool if Squeak could use an
> "optimistic" approach instead.
>
> If all my classes in the image (in all packages) have different names -
> then I can refer to them just like today. When I load a package with
> "yet another Parser class" then it would be nice to get a conflict and
> then resolve it through an explicit reference or some explicit
> "remapping" or whatever - but not until there actually is a conflict.
>
> This is good because conflicts are GOOD. It tells us something - "Hey,
> perhaps these classes should be merged?" etc. In the Java world where
> everyone has their own little sandbox, sure they have no conflicts, but
> everyone keeps reinventing the wheels...
>
> It is also good because doing the equivalent of "import
> se.bluefish.squeakmap.yaddayadda.*" would drive me totally crazy. I
> don't want to go there. Please tell me you don't want that either. :)
>
> regards, Göran
>




More information about the Squeak-dev mailing list