[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: One more item to the collection of Lua hate-speech
- From: Geoff Leyland <geoff_leyland@...>
- Date: Fri, 2 Jul 2010 11:27:28 +1200
On 2/07/2010, at 10:48 AM, David Given wrote:
> Me, too --- but if you look back at the list archives you can find
> endless arguments about local-by-default (which is horrible) vs
> local-by-default (which is slightly less horrible). The usual conclusion
> is neither-by-default would be better but that it's now too late to change.
(I think you meant global-by-default the second time?)
I'd say:
local-by-default: flawed
global-by-default: works, care required
neither-by-default: works, extra typing or extra visibility depending on your point of view
strict.lua gives you some of the advantages of neither-by-default without extra typing, and I imagine further fiddling with _G's __newindex can offer extra visibility.
That's what I like about Lua: the core of the language seems carefully designed, and it has mechanisms to do what suits you best.
Cheers,
Geoff