Microsoft shopping for Java alternative

Steve Dekorte steve at dekorte.com
Tue Feb 17 21:15:52 UTC 1998


Joachim Durchholz <joachim.durchholz at munich.netsurf.de> wrote:
> Namespaces would be an option. I'd like to see some way of tracking
> classes that migrate from one namespace to another, like if there is a
> class in namespace 'IndependentDevelopers/Steve', and it later makes it
> into the core of the system, then clients that access the class under
> the original name will be silently rerouted to the new kernel class.
> 
> Another problem would be setting up a good namespace structure. I guess
> there are at least as many proposals as developers here. And IMHO a
> namespace with a bad structure is worse than having no namespace at all.

If you implement forwarding namespaces like Self and NewtonScript, the
code isn't so dependent on the structure. In them, all messages are to self.
If self doesn't respond to the message, it goes up the inheritance and proto/class
chains, if none of them respond to it, the message is redirected to some 
"namespace" (each object could know which namespace it is in). This could be
the global/"lobby" namespace, one that holds a library of objects, an isolated 
namespace, etc. So you can switch around the forwarding between these namespaces 
without changing the actual application code that lives within. Both languages 
have ways of getting at a global namespace and following a path which could
create structure dependencies, but with the proper use of forwarding mechanism
these path references could possibly be eliminated. This system also provides 
an elegant way of local overridding library classes, etc.

Steve





More information about the Squeak-dev mailing list