lua-users home
lua-l archive

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


On 28 September 2012 11:10, steve donovan <steve.j.donovan@gmail.com> wrote:
> ...
> import bread, butter, jelly
>
> with the understanding that these tables are injected as locals. This
> can't be done with a library, and this isn't the first time this
> syntax suggestion has been made.  But the Lua philosophy is to keep
> the syntactical sugar down as much as possible, which is a good design
> goal because we could end up with a lot of special case syntax and
> corresponding reserved words.
>

I know this is kind of frivolous, but for "syntactic sugar" you could do
something like this.

function import(m)
    print(m)
    return import
end

import "module1" "module2" "module3"