lua-users home
lua-l archive

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


> For example, what if:
>   x = expr?.field
> Were sugar for:
>   local var = expr;
>   x = expr and expr.field

We can achieve the same effect writing

    x = (expr or {}).field

-- Roberto