[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: Petite Abeille <petite.abeille@...>
- Date: Thu, 1 Jul 2010 21:34:45 +0200
On Jul 1, 2010, at 9:25 PM, Luiz Henrique de Figueiredo wrote:
> Lua is probably quite fast already even if you only use
> global variables, ie, don't bother with locals.
FWIW, in modules, I use locals as an import mechanism, irrespectively of "performance" consideration.
E.g.:
-- import dependencies
local table = require( 'table' )
local assert = assert
local getmetatable = getmetatable
module( 'DB' )
-- no access to globals from that point on
For example:
http://dev.alt.textdrive.com/browser/HTTP/DB.lua