Quick comparison of two Namespaces proposals
stephane ducasse
stephane.ducasse at free.fr
Tue Sep 18 12:57:42 UTC 2007
>
> - Imports are done in your code "per Namespace" which is immensely
> better
> than like for example in Java where it is per class (well, per
> file, but
> anyway). It is still though the major difference with my proposal
> in which
> there are *no* explicit imports at all.
the problem with per namespace is that you can get unanticipated
conflicts.
here is a scenario that klaus from Smalltalk/x explained to me once
you have two namespace
N1
A
N2 import N1
B
method foo
^ B
everthing compiles
now you add a new class B in N1
and the system does not bark....
a while later you recompile the method foo and now you may be in
trouble.
I only have 2 min for this email so I let you imagine other scenario.
But klaus told me that this was a problem in VW and C++ too.
Stef
More information about the Squeak-dev
mailing list
|