Squeak and Namespaces
goran at krampe.se
goran at krampe.se
Thu Nov 30 21:44:12 UTC 2006
"Michael van der Gulik" <mikevdg at gmail.com> wrote:
> On 11/30/06, G=F6ran Krampe <goran at krampe.se> wrote:
> But others
> > might benefit from at least *contemplating* that namespaces:
> > - Don't *have* to be hierarchical.
> Well, this is just the next step in the evolution of namespaces. How long
> would it take before you go from:
I don't agree. I wanted it to be a single level by design. Simple.
Buckets of names. And I don't want them to be fine granular - they
aren't Categories - they are Namespaces. One per Project is well enough.
One for basic official Squeak is just fine - and in that particular case
we just use good ole Smalltalk.
And as I wrote in some other post - what does the hierarchy really mean?
> Arguably, we're not at that stage yet, and one-level Namespaces fix all our
> current problems. I've already been bitten by lack of Namespaces - I
> couldn't implement my own SocketStream because the name was already used.
Right! I did the exact same thing you know. :)
> - Don't *have* to use file/class/package level imports.
> Like I mentioned earlier, I need this feature for securities' sake, but I'm
> probably going to implement a completely different Namespace system for my
> own use.
Ok. So then you would be using imports purely for constraining lookup.
Could easily be added of course.
Btw, the core of my solution is now described in perfect detail (and I
just tweaked it so that it seems to work in 3.9):
> I'm quite impartial to how Namespaces are implemented in Squeak and I think
> your proposal is fine, provided that I can remove it later if it gets in my
> way. Currently this seems trivial, and if people don't start making
> unnecessary prolific use of the new Namespace syntax then I could still
> re-use most of the existing code.
As I said - for basic official Squeak I don't think we should use it at
> So.. +1 to your proposal from me.
More information about the Squeak-dev