I would not Shadowing sucks in general. but this is just a gut feeling. Stef On Nov 4, 2009, at 9:28 PM, Lukas Renggli wrote:
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.
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