> For performance reasons, all table accesses
(get/set) performed by
> these functions are raw.
This makes sense to me. When I use
unpack, it is very often in a spot where an expensive
operation would be unwelcome.
However, I don't like these kinds of... "exceptions to the
rules". Lua has metatables, I don't like to have to think
about whether or not the standard library will respect
them, or not.
In the 5.1 era, when __ipairs
wasn't around, the exception had a powerful reason: ipairs
won't see your sequence and so neither will unpack. But
now, it would be nice to see symmetry and "raw*" versions
of the non-metatable variety, if the extra speed is
needed... or some other, better method of achieving the
same goal.
This is relevant to broader Lua
because if I expect my module's table to be unpacked, then
I need to export it as a "literal", as opposed to an
object where the sequence is calculated.
-Andrew