lua-users home
lua-l archive

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


On Thu, Jul 15, 2010 at 3:32 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
> Global declaration cannot be on by default because of (1) compatbility
> and (2) easyness for writing config files and interactive code.

Having a dummy 'global on' line at the top of a module would be a
clear enough idiom.

Another idiom would be:

global mary,jane

function mary() .. end

function jane() .. end

How would code access globals like math, io, etc?  These would have to
be predeclared up front?

How are module imports handled - does the semantics of require() change?

steve d.