lua-users home
lua-l archive

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

> The most frequent use of gettop and isnone in C lua libraries to
> modify what a function does really disturbs me.
> foo(nil,nil,nil) should be the same as foo(nil,nil) and foo() etc
> It disturbs me even more that such bad behavior is present in the lua
> core libraries in the form of table.insert.

As noted nil has the funky characteristic to be a "1.5"-class value.
Argument lists can and must differ between nil and none, tables can't.

> The fact that table.insert(t,v) performs very different behaviour to
> table.insert(t,k,nil) is a disturbing bite in the ass.

language please.

> ==> What steps can we take to discourage the writing, and usage of
> libraries that do such evil?

How about removing nil altogether? Ok been there, suggested that,
nobody like it :)