|
|
|
|
|
by ithkuil
1180 days ago
|
|
there are things that make perfect sense when a language forces you to use an IDE anyway if you want to do anything longer than a toy. Shadowing is not a big deal with IDEs; you can always see the type of the variable , jump to definition easily etc etc. The rule to not shadow variables makes more sense when you want to understand the code just by looking at it. |
|
I’ve tripped over unexpected shadowing often enough that I wish more languages would forbid it. I rarely have trouble choosing appropriate variable names to avoid shadowing.