[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: require() multiple parameters
- From: Craig Barnes <craigbarnes85@...>
- Date: Fri, 28 Sep 2012 14:42:20 +0100
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"