A little namespace "proposal"

Lex Spoon lex at cc.gatech.edu
Thu Apr 8 04:21:33 UTC 2004


Three things to add, that might have been overlooked.  (It's a big
thread!)

#1.  You do not have to tweak the names in the code, if you tweak the
lookup list in the class definition.  So instead of changing "Delay" to
"Tweak::Delay", you can simply add "Tweak" no the namespace list for the
class.

This feels a little better to me.  When I type a method with an
unadorned "Delay", then I am explicitly being vague and I don't want the
dev tools to undo that.  :)  I'd *like* to be able to swap out
namespaces and end up with a class behaving differently, as in the
Socket example mentioned earlier.

But aside from the abstract argument, it's easier to implement in
Squeak.  :)  It is easier to tweak a class definition than to modify
text-based code.  (Code is not an object in Squeak.  :(  )

It's an option that can be kept in mind.

#2.  DON'T ASK QUESTIONS.  If the user types a name that is not
successfully bound, and the tool finds just one instance where the name
is used, then pick that instance and go with it.  Don't ask the user to
explicitly say "yes" to choices that are obvious, just because once in a
thousand times they may pick a different option.

#3.  There should be some mondo-large namespaces around such as Squeak
which include all the normal stuff.  Having them around will limit the
impact of people writing a class which conflicts with something in the
main image; sure it will conflict, but innocent users will never know
because the compiler will see the Squeak version first.


In general the approach sounds great to me.  Start by making a class
called Namespace and let's see where we can go with it.  :)

-Lex



More information about the Squeak-dev mailing list