2009/11/6 Stéphane Ducasse <stephane.ducasse@inria.fr>:
Well, with the presence of traits, i don't see how we could avoid that nicely.
May be I missed something but I do not see why? If I do not use in a trait a local variable that are the same name as an iv then I have no problem. So just using a different local or iv solve it.
Consider uses of traits over a large time span and by multiple developers. One may change an already existing trait (and introduce/change temps names), which already used by multiple projects. But since author is physically unable to check all uses of this trait, then at some point, shadowing may occur. Of course, the maintainer of code who using the trait can react and change the names of ivars, or ask the author of trait to not use some names for temps vars. But since it doesn't affects the code semantics, nothing bad could happen (class vars is different story). And i don't agree that shadowing is considered evil.
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.