Re: scope of variables

new topic     » goto parent     » topic index » view thread      » older message » newer message
jeremy said...
jimcbrown said...

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu