[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Oddity with tinsert (Lua 4.0)
- From: Reuben Thomas <rrt@...>
- Date: Mon, 13 Aug 2001 19:06:36 +0100 (BST)
> About "tinsert", its implementation is correct according to its basic
> description in the manual. It simply does not say what happens when you
> call it with 4 arguments, so it can do anything. Unfortunately, the manual
> also gave a Lua code "specification" which says much more than it needed to
> This is a (nice) example of the freedom we have when we do not overspecify
> things in the manual.
However, in general I think best practice is to make C API functions behave
just like Lua ones when passed more or fewer arguments. Unfortunately there
are a few standard functions that break this (they can tell the difference
between being passed a nil final argument and no final argument), but it's a
good thing to work towards; then no-one is surprised.
http://sc3d.org/rrt/ | free, a. already paid for (Peyton Jones)