lua-users home
lua-l archive

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


> Believing that "i-n+1" equation cost me a couple hours of debugging (yes, a
> little embarrassing).

Sorry about that.


> I don't understand the reasoning about making upvalues the last arguments.
> If they were first, you could still access them without knowing how many
> arguments the function received (as positive index 1, 2, 3 etc.).

This is true, but then it is a little more dificult to access the real 
parameters, as the first parameter won't be at index 1. With the current
scheme, both the parameters and the upvalues have "fixed" indices.

-- Roberto