lua-users home
lua-l archive

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


> Perhaps the user guide should state, "All functions will ignore any
> arguments after the number listed that they take." This is a reasonable
> assumption, but not one which is valid unless it is guaranteed.

Usually, when the manual says nothing, it follows that the behavior is
not defined. The manual does not need to be complete: That gives more
freedom for alternative implementations and for future versions.

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 
say... 


> (Although inserting
> all of them would be cooler, and would not break any code which doesn't
> assume that tinsert can handle cases of other than exactly three
> arguments.)

This is a (nice) example of the freedom we have when we do not overspecify
things in the manual.

-- Roberto