2009/11/4 Lukas Renggli <renggli@gmail.com>:
It shows up in the transcript for all users of the trait when the method is accepted. This is nasty, because that introduces ugly dependencies.
Of course we might want to relax the semantics of Smalltalk and allow shadowing of variables, so that class variables could shadow globals; instance variables could shadow super instance variables, class variables, and globals; temp variables could shadow outer temp variables, instance variables, class variables, and globals, etc.
I thought Python allowed this kind of shadowing? Don't remember if this was cool or not, but it sounds quite bit messy.
not only Python. Most languages i used to know, allowing a local-scope names to shadow an outer scope names without any warnings and bashing the user. Some IDEs could warn about such things, but not compiler.
Lukas
2009/11/4 Â <csrabak@bol.com.br>:
Em 04/11/2009 17:53, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> escreveu:
Right. Â However, shouldn't the message about shadowing be issued when we accept the method in the browser?
 ???       Just      looking      the      first ArrayTest>>#testCopyReplaceAllWith1Occurence,  it has  a  temp named result and an inst var named result
 2009/11/4 Lukas Renggli :
First I thought this is  because temps in trait methods shadow the inst-vars of  the classes  that use these  traits (ouch!),  but it doesn't seem to be the case.  I don't understand either why we get these messages. Lukas 2009/11/4 Stéphane Ducasse :
Strange this is related to traits? Stef On Nov 4, 2009, at 5:17 PM, Lukas Renggli wrote:
When I recompile a Pharo image Compiler recompileAll I get 819 messages  complaining about shadowed variables, mostly but not only in the new collection tests. Does anybody knows why this happens? Lukas [819 messages snipped]
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Lukas Renggli http://www.lukas-renggli.ch
_______________________________________________ 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.