[GOODIE] Namespaces-gk

goran.krampe at bluefish.se goran.krampe at bluefish.se
Fri Apr 16 10:05:27 UTC 2004


=?ISO-8859-1?Q?st=E9phane_ducasse?= <ducasse at iam.unibe.ch> wrote:
> >> So, looking through the code, one thing that strikes me as overly 
> >> complicated is all the various modifications around renaming.
> >
> > Yep, and I think we can do still simpler in other places, too.
> >
> > For example: How about creating namespaces on the fly? This would 
> > mimic the behavior of PackageInfo. Such a lightweight Namespace would 
> > know nothing about itself but its name. If I create a  "Namespace 
> > named: #Whatever" and ask it for its bindings, it just looks into 
> > Smalltalk and selects all matching associations. Of course, one could 
> > then create specialized Namespaces, just like some people create 
> > specialized PackageInfos, but the system works fine without them.
> >
> > Also, I thought namespaces should mostly be invisible in Göran's World 
> > ;-) So, the class-template where now some namespace is magically 
> > chosen could actually just show an unqualified name. Otherwise, we 
> > have to rewrite every Fine Manual that shows how to create a class ...
> 
> yes and then you have to explain that again up front. That's why VW is 
> now terrible to start. The template for class creation is bad sicne it 
> forces the majority to think about 98% of the stuff that they do not 
> use type, imports...
> 
> and worse than that. people will create far too much namespace. Because 
> I'm sure that you do not want a namespace per package or category. Here 
> in VW we have one namespace by big applications around 300 classes and 
> this is enough.
> 
> stef

Yeah, well - as I wrote in another posting - it is just the template. We
can easily let that be "as it is" and even make it "pluggable" by going
through LookupContext and hey, smack some Preferences on it. No problem.

So if you don't want namespaces you can just go on like before and live
in Smalltalk. The only thing "required" of people is that they learn
what "Foo::Bar" means, because it will be visible here and there.

But a simple "understanding" is just that it is a prefix naming
convention that the tools then try their best not to bother you with.
Such a mental model gets you quite far. :)

regards, Göran



More information about the Squeak-dev mailing list