The downside is when reading code you’re keeping in your head information about the type of each variable. If you skim through the code and miss one of these redefinitions then you may be mistaken about the variable’s type.
That said, I still think sparing use of this is justified, especially with an editor which can show types on mouseover.
That’s true, but this has never been a problem for me looking through large codebases and doing code reviews, in other languages I was constantly annoyed by not being being able to shadow
That said, I still think sparing use of this is justified, especially with an editor which can show types on mouseover.