lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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
user guide.

> If you call my functions, in many
> cases you can add extra parameters to the beginning without any
> effect.

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