[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 08:33:23 +0100 (BST)
> tinsert is actually a notable exception. I should have looked at
> it specifically before responding. However, many other functions
> do not explicitly state what their behavior is, if passed an
> incorrect number of parameters.
Perhaps I'm being naive, but I expect library functions just to work like
Lua functions. These adjust their parameters according to the rules in the
> If you call my functions, in many
> cases you can add extra parameters to the beginning without any
Ugh. That's the opposite way round to the way native Lua functions work! I'd
find that confusing.
> parameters is nil, then it restores the default behavior. So, calling
> settagmethod(tag, event) will probably restore the default behavior.
This is a more difficult case. C functions can tell the difference between
receiving nil and not receiving a parameter, and some use this...
http://sc3d.org/rrt/ | RSA, n. safety in numbers