[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: use of gettop to change functionality
- From: Dirk Laurie <dpl@...>
- Date: Tue, 1 Mar 2011 13:29:43 +0200
On Tue, Mar 01, 2011 at 12:56:21PM +0200, Daurnimator wrote:
> 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?