Re: scope of variables
- Posted by jimcbrown (admin) Dec 30, 2010
- 2885 views
Well, let's wait a moment...
I prefer coconut's change most of all.
So does Jaygade.
Derek seems to as well.
Matt seems to be open to the idea as well.
Jeremy seems to be canvasing to look for any opposing opinions. I don't think he's outright opposed to the (so far) generally agreed upon change, but rather trying to look at this from all angles. I think, if no one speaks up opposing coconut's solution, then that is what we'll end up implementing in 4.0.1
What would be worse though, is for us to agree that we should change this in one way, then on Jan 2 get 200 posts saying we need to change it back.
Since it's almost a holiday, let's give it some time to make sure that everyone who's interested has had a chance to speak up, and then go forward from there with coconut's change.
The problem with that is that it could break a lot of pre-existing code. All the way back from the 1.x days.
Since we're post-4.0, we absolutely can not make this change. We can not break existing code.
Maybe provide a with/without option that is on by default because it is a pretty bad practice. i.e.
without strict_naming integer abc = 20 procedure def() sequence abc = "John" ? abc end procedure
Valid since without strict_naming, but by default strict_naming is on.
Jeremy
Why do you want to change a rule that is accepted in all languages: >>One can redeclare a variable inside a function and shadow an outer one.<<
There is nothing wrong with that rule. If you do that, one will have to constantly use name space qualifier, horrible!
It's better to leave it as it is now than make things even worse.
Jacques