Re: scope of variables
- Posted by jimcbrown (admin) Jan 01, 2011
- 2589 views
I'm not sure this needs to be put into 4.0.1. Right now, I'd put it into 4.1. Here's why:
- It will likely require some significant changes to the front end.
Actually, if it has to wait for 4.1, then we need to reconsider the impact.
coconut's solution (to allow shadowing inside loops, etc) would not break anything, as it's just increasing the range of what is permissible.
Leaving it alone, as-is, would not either.
However, any other solution (not allowing variable redeclaration inside a loop, changing blocks so that one can not declare a variable inside a loop and then again outside a loop) could break 4.0.0 code.
So, either this is serious enough to make it into 4.0.1 (invalidating any program that actually relies on the bad? broken? 4.0.0 behavior) or else we should not change it in a way that could break any future 4.0 program written between now and the release of 4.1