[squeak-dev] A lot of shadowed variable names in Squeak 6.0 needing clearing up

tim Rowledge tim at rowledge.org
Sat Dec 31 21:47:00 UTC 2022


An excellent example is Random>>#nextBytes:into:startingAt:

It refers to a temp named 'index' which shadows an instvar. Should the method be just using that instvar, or a different named temp? I *think* the latter but it's possible Levente would suggest otherwise. All I can be sure of is that the RandomTest class reports all ok.

> On 2022-12-31, at 1:32 PM, tim Rowledge <tim at rowledge.org> wrote:
> 
> The tricky part with some cases is trying to work out if the shadowing is simply an oversight and the ivar can be used, or is it a place where a separate variable is really needed and the name choice was simply unfortunate.



tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: SG: Show Garbage




More information about the Squeak-dev mailing list