[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Feature Suggestion: Make rawset() coerce "nothing" as its 3rd argument to nil, don't error
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Wed, 18 Jul 2012 23:06:37 +0200
On Wed, Jul 18, 2012 at 10:55 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> The signature of rawset is
> rawset (table, index, value)
>
> The intent is to set a value in a table. If no value is given, this is
> clearly a mistake by the programmer. There are places where an argument
> may be optional, but I don't think this is one of them.
What I find surprising is that even though Lua functions implemented
without vararg convert missing arguments to nil, the core functions
with a finite number of arguments don't. I'd expect them to do the
same.
-- Pierre-Yves