> I introduced a preference based on hernan changes (for TDD) to avoid to have > popup showing up > all the time and I was wondering if this is this change that introduces this > bug. > > | a | > a + 1
That's a use of an 'undefined' temp. I haven't noticed that change yet, but indeed that could be problematic too (so we have a 3rd point). Lint already spots that issue today. > was not related to shadowing but to variable usage. So now it may have also > cancel the identification > of shadow and this is what I asked lukas to check. When was this change done? Does anybody know? If so, I could look at the diff and propose a change. >> It's a question of cross-dialect compatibility and introducing future >> obscure bugs in Pharo. > > I do not see why this is cross dialect compatibility? Is shadowing variable > is not allowed in Smalltalk? ANSI doesn't say anything, so shadowing is probably fine. Generally, I am all for shadowing variables and assignments to arguments, but then the tools should not break. Also it should be consistent, because currently in some cases shadowing is disallowed (instance variables cannot shadow other instance variables, temporary variables and arguments cannot shadow other temporaries and arguments) and in some it is allowed (temps can shadow instance variables, class variables can shadow globals). > In VisualWorks you get a pop up but you can define it. Now that the tool > helps you to avoid them when you create them is different than the semantics > level. Yes, that's cool (the user is always warned) and it is applied consistent across all types of variables (even instance variables that shadow other instance variables are possible). I think that's the ideal solution. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
