Exporting Namespaces

Michael van der Gulik mikevdg at gmail.com
Tue Feb 20 21:05:30 UTC 2007


On 2/21/07, J J <azreal1977 at hotmail.com> wrote:
>
> +1.  Just please, no colons.  Or at least make it configurable so I don't
> have to see it. :)  The best would be if direct namespace access looked
> like
> normal message sends.


What would you suggest? I could use any non-whitespace character, I think.

Currently I'm using dots:

a := Collections.Arrayed.Array new: 5.

Usually though you'd just use:

a := Array new: 5.

and add the Collections.Arrayed Namespace to your import list. Each import
list is common to all classes at a certain branch of the Namespace
hierarchy, so the dotted notation is only useful if, in the same branch of
the Namespace hierarchy, you want to use two classes (or global vars) that
have the same name.

I'm not entirely sure how I'd implement your message sending idea, and it
doesn't particularly feel "right" to me. I assume you mean:

a := Collections Arrayed Array new: 5.

Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070221/d7815be6/attachment.htm


More information about the Squeak-dev mailing list