lua-users home
lua-l archive

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


On Wed, Nov 10, 2010 at 1:52 PM, KHMan <keinhong@gmail.com> wrote:
> If quoting and non-quoting are both valid and have different behaviours,
> then it is a format fail.

Absolutely; I apologize for confusing the issue.

A variant on Luz' proposal is very readable:

{
  one = 1,
  two = 2,
  three = cond(3,THREE_ALLOWED),
  four = 4
}

where cond is simply

function cond(val,condn)
   if condn then return val end
end

steve d.