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.

Is there a source for that claim? I'd reckon that the most frequent use of these is to do optional/variable arguments, and checking wether you got the correct number of arguments. At least that's what I do with those.

> foo(nil,nil,nil) should be the same as foo(nil,nil) and foo() etc

Nope, it should not. Passing three nils is not the same as passing nothing at all.

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

Could you name a few, please?

Gunnar