lua-users home
lua-l archive

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


On Wednesday, March 20, 2013 03:21:10 AM Coda Highland wrote:
> Points 2 and 3 here could be addressed by having separate values for
> "undefined" and "no value". That much, at least, is relatively
> irrelevant. If such a feature were to be added to Lua, the only
> difference is that the automatic fallback would return "undefined"
> instead of nil, but omitted parameters and explicit nils would still
> be nil.

No, because function parameters and variable assignment are the same thing.

    a,b,c = 1,nil  -- 1,nil,undefined
    a,b,c = (function() return 1,nil end)()  -- ditto
    (function(a,b,c)
      -- 1,nil,???
    end)(1,nil)
    (function(...)
      a,b,c = ... -- 1,nil,???
    end)(1,nil)

I look at the issue as job security. If bugs were obvious and easy to find, 
that would really cut into my billable hours.

-- 
tom <telliamed@whoopdedo.org>