Squeak and Namespaces
Todd Blanchard
tblanchard at mac.com
Sun Dec 3 04:43:13 UTC 2006
This is pretty good.
FWIW, I am totally against adding new prefixes. All classes already
have an identifier that resolves them to a "package" and that is
category. So the long name of Object is really Kernel-
Objects:Object. Using the one class dictionary per package strategy
mentioned, I think the compiler should simply prompt the user with a
menu like:
Ambiguous reference to class "Widget"
Foo:Widget
Bar:Widget.
It should remember this first time and resolve it that way from now
on much the way it spots new message selectors and remembers that you
do indeed mean that name. For the rare instance when one needs to
reference two classes with the same name in different packages, one
can type the optional package prefix.
That would solve the problem nicely from a user's perspective. How
to make this work is left as an exercise for the implementer. :-)
-Todd Blanchard
On Dec 2, 2006, at 1:32 PM, J J wrote:
> As far as what is the best solution for namespaces, here is my
> personal pick:
>
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2006-
> November/111762.html
>
> No new syntax (I think), and it gives a lot more then just prefixes.
>
> _________________________________________________________________
> Stay up-to-date with your friends through the Windows Live Spaces
> friends list. http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/
> direct/01/?href=http://spaces.live.com/spacesapi.aspx?
> wx_action=create&wx_url=/friends.aspx&mk
>
>
More information about the Squeak-dev
mailing list
|