[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Another take on locals by default.
- From: Enrico Tassi <gares@...>
- Date: Tue, 22 May 2012 15:51:38 +0200
On Tue, May 22, 2012 at 03:28:12PM +0200, Pierre-Yves Gérardy wrote:
> I mean, why was the syntax (or a variation thereof, since it freed the
> % operator) removed?
>
> It is not incompatible with either proper lexical scoping or
> read/write upvalues.
>
> It just add syntactic guards and prevents potential blunders
I don't know the real reason, but I find that not having to prefix
variable names with funny symbols like in many other languages is a
pretty damn good reason ;-)
More seriously I find that a wrong access to a global is easy to prevent
changing the metatable of _G (or just require strict).
Cheers
--
Enrico Tassi