Name spaces in Spoon

Keith Hodges Keith.Hodges at
Sat May 27 00:16:36 UTC 2006

The solutions discussed here only seem to solve one minor naming problem
rather than a proposal that could bring the community a powerful coding
and problem solving paradigm.

I remember Dave Simmons talking a lot about namespaces. One of the
benefits of his idea was that if namespaces apply on a per method basis
then you have a strategy for solving the fragile baseclass problem.

If you import a class or framework module or whatever into the namespace
that scopes your project and apply further methods bound to that
namespace only to fix or tweak that class, you can do whatever you need
without accidentally breaking anything for other clients of the said module.

Ruby and Javascript coders do this fixing tweaking all the time because
they know that any additions to the "environment" (I always add eachDo
iterator to Array in javascript) are limited in scope to the web page or
script that they are writing. Module/Framework writers have to think
about these things more carefully. It seems that  a most common way of
achieving this is through half decent documentation (auto generated etc)
that allows users of a framework to know what is there and what not to
step on, and their tools may warn of such things at compile/load time.
This doesnt really work for us since squeakers don't seem to bother so
much with api documentation.

I was surprised to find that Laszlo defines graphical elements using xml
and any <view id="myView"></view> such elements that have an id
attribute results in a global being defined that you can access myView.
This has to be the worst case scenario if I want to import or paste a
component from someone else that may very easily clash. So there are
still folks out there getting this really wrong.

just my 2p


All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine

More information about the Squeak-dev mailing list