Re: Feature Suggestion: Make rawset() coerce "nothing" as its 3rd argument to nil, don't error
[
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: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2012年7月18日 17:55:49 -0300
> Unfortunately it looks like rawset() doesn't like being called with its
> third argument being "nothing" and not nil. Would it be possible for Lua
> upstream to have it instead coerce nothing to nil?
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.