On Reuse

Lex Spoon lex at cc.gatech.edu
Wed Jun 30 22:51:31 UTC 1999


Edward P Luwish <eluwish at uswest.com> wrote:
> Would namespaces make reuse easier by permitting the "reusable" code to access private versions of otherwise well-known objects?  It certainly isn't the only problem, but a big enough one.  It may be valuable to approach code reuse the way one approaches porting.  Porting to a foreign environment is a pretty well understood activity with lots of grist for the pattern mill, unlike reuse which is more of a holy grail as you eloquently point out.
> 
> Ed


I believe so, but at a different level.  I don't think anything can stop the fundamental problem that computer systems are complex, and thus that a component of one system can't just be plopped somewhere else even if they do basically the same thing.

The way namespaces help reuse, AFAICT, is that when you *do* decide to try and make a reusable component, you can give it a name that is unique across the world.  Thus, it is easier to grab a reusable component and plop it in another program program, because there are definately no name conflicts.  Without namespaces, any component you write has a chance of conflicting with someone else's component--and such problems are a real nuisance to work around.  Putting prefixes on your names does help, but it doesn't completely eliminate the risk.



Lex





More information about the Squeak-dev mailing list