Yet another namespace proposal (was Re: Quick comparison of two
Namespaces proposals)
Michael van der Gulik
mikevdg at gmail.com
Thu Oct 4 08:58:08 UTC 2007
On 10/4/07, Jason Johnson <jason.johnson.081 at gmail.com> wrote:
>
> Ok, I've stated my reasons why I don't like Göran's approach, now time
> to give a suggestion myself:
>
> What if namespaces were just objects that behave like dictionaries
> with the key being a string and value being a meta-class?
>
> They could be used as in:
>
> Seaside at: #Component
>
> or perhaps with a special shorthand:
>
> Seaside Component "maybe Component needs a #?"
This is exactly what my approach is. Namespace is a subclass of Dictionary.
In a method, class definition or Workspace, you can use either either of:
Seaside at: #Component. " Look it up at runtime "
Seaside.Component "Look it up at compile time"
I'm sure if you really wanted the "Seaside Component" notation, it would be
possible for you to add this as well.
Gulik.
--
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20071004/a6d422bf/attachment.htm
More information about the Squeak-dev
mailing list
|