|
|
|
|
|
by zamalek
498 days ago
|
|
The example given isn't that great. Here's a significantly more common one: var age = get_string_from_somewhere();
var age = parse_to_int(age);
Without same-scope shadowing you end up with the obnoxious: var age_string = get_string_from_somewhere();
var age = parse_to_int(age_string);
Note that your current language probably does allow shadowing: in nested scopes (closures). |
|