A lightweight namespace "proposal"
Peter van Rooijen
peter at vanrooijen.com
Thu Apr 22 15:33:33 UTC 2004
goran.krampe at bluefish.se wrote:
> Hi Peter!
Thanks for your reply, I just read it all, and thanks for the many
agreements. I believe there is a real problem to be solved by namespaces
and I have good hopes that it is going to happen, thanks in no small
part to your work (and I think Andreas provided much of the momentum by
advocating an approach that places high value on simplicity).
I'm only going to give a short response now, and will probably get back
to other individual points you made later.
> Peter van Rooijen <peter at vanrooijen.com> wrote:
>>I really believe that it can be this simple, and that this is really
>>useful, in this simplicity. Not having implemented it, I hope I didn't
>>miss something that makes this proposal not work :-).
> Eh... I just assumed you had looked at my implementation.
:-). I've noticed before that you often answer posts while you are
> You didn't touch upon the principles of rendering short names (when
> possible) in the tools and using only qualified names in the actual
Okay. My lightweight namespaces proposal *avoids* that issue entirely (I
believe this follows from the proposal, but I did not make this point
explicitly). The source is exactly as it is, no different rendering in
different circumstances is required or useful. This is another way in
which my proposal embraces simplicity. It introduces no need to modify
the browsers or the code management system to render source differently.
I *did* elide treatment of the issue of how to compile code under the
lightweight namespace system. Part of the reason is that I don't even
know how code is compiled currently ;-). Perhaps currently the
associations (bindings) are compiled into the compiled methods (can
someone in the know answer this?).
If this is indeed the current mechanism, it requires scanning parts of
the system for the need to recompile as class/method/pool definitions
are added or modified. A similar approach can be used with lightweight
Alternatively, one might adopt a slightly more dynamic lookup mechanism
with extra indirection, avoiding recompilations at the cost of dynamic
lookups. But this is all in essence an implementation detail.
More information about the Squeak-dev