[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Globals (more ruminations)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 18 Jul 2010 11:20:42 -0300
> >> [...]
> >> - An assignment to a free "a" that is inside the scope of another global
> >> declaration is an error ("attempt to assign to undeclared variable
> >> 'a'").
> >
> > Rather bizarre ...
>
> Not really, the final rule is just there to ensure backwards
> compatible. It would be simpler to enable the error by default, but
> that means that lots of code would have to be changed.
Sure compatibility is very important, but the rule is not only for
compatibility. Most small/simple scripts do not need this extra
complication (think about config files or interactive sessions).
-- Roberto
- References:
- Re: Globals (more ruminations), Roberto Ierusalimschy
- Re: Globals (more ruminations), Geoff Leyland
- Re: Globals (more ruminations), Alexander Gladysh
- Re: Globals (more ruminations), Roberto Ierusalimschy
- Re: Globals (more ruminations), Juri Munkki
- Re: Globals (more ruminations), Roberto Ierusalimschy
- Re: Globals (more ruminations), Patrick Donnelly
- Re: Globals (more ruminations), Roberto Ierusalimschy
- Re: Globals (more ruminations), Edgar Toernig
- Re: Globals (more ruminations), Florian Weimer