On Wed, Jun 11, 2014 at 7:43 PM, Kalafut, Bennett <
bennett.kalafut@thermofisher.com> wrote:
> Inspection of the
lua.org ltablib.c confirms that this isn't just a problem with the embedded Lua we're using: the official code uses lua_rawgeti for array access and doesn't fall back on the metamethod at all.
One thing that's often bugged me in Lua is the imbalance between table access methods:
if I want to look up a string, I can use lua_getfield() as a shortcut, instead of lua_pushstring() and lua_gettable().
If I want to look up an integer, I can use lua_rawgeti().