lua-users home
lua-l archive

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


On Thu, Mar 24, 2011 at 09:38, Pierre Chapuis <catwell@archlinux.us> wrote:
> On Thu, 24 Mar 2011 01:33:41 -0400, Sean Conner wrote:

>>> 1. OK
>>> 2. (error) ERR Operation against a key holding the wrong kind of value
>>> 3. (integer) 4

>> {
>>  { true  , "OK" } ,
>>  { false , error_value } ,
>>  { true , 4 }
>> }

> Or even:

> {
>  { "status", "OK" },
>  { "error", error_value },
>  { "integer", 4 }
> }

> Or better imo:

> {
>  { "OK", error_value, 4 },
>  { "status", "error", "integer" }
> }

In this case, why the outer table? Make it two return values.

However — is this comfortable to work with from the user's point of view?

Alexander.