[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: argument alternative
- From: Klaus Ripke <paul-lua@...>
- Date: Tue, 23 Feb 2010 19:13:40 +0100
On Tue, Feb 23, 2010 at 06:59:35PM +0100, Petite Abeille wrote:
>
> On Feb 23, 2010, at 6:50 PM, spir wrote:
>
> > PS: What about named args in Lua? After all, an arg list is a kind of table...
>
> "named args" in Lua are tables
long answer: you use a table as the single parameter.
You can omit the () when calling a function with a table constructor,
so it looks almost like a plain call
somefunc{'foo', 'bar', baz = 42}