lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Apr 24, 2013 at 12:31:59PM +0200, Pierre Chapuis wrote:
> > On 24/04/2013, at 7:17 PM, moonfruit <dkmoonfruit@gmail.com> wrote:
> 
> > http://lua-users.org/wiki/LocalByDefault
> 
> This. I tried to make the main point here for people who don't want to dig
> in the Wiki: https://gist.github.com/catwell/5451173
> 

The creator of Ruby also expressed similar regrets, I believe, with original
Ruby's default local scoping:

	http://www.rubyist.net/~matz/slides/rc2003/mgp00010.html

Because Lua supports proper lexical scoping and nested closures so
thoroughly (as opposed to, e.g., Python), default local would be untenable.
The most sensible and simplest rule is what Lua uses, IMO.