[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: use of gettop to change functionality
- From: Daurnimator <quae@...>
- Date: Tue, 1 Mar 2011 21:56:21 +1100
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.
The fact that table.insert(t,v) performs very different behaviour to
table.insert(t,k,nil) is a disturbing bite in the ass.
==> What steps can we take to discourage the writing, and usage of
libraries that do such evil?