> The loop itself is quite useless, why wasn't it also removed ? (Just kidding)
Good question! I guess LuaJIT isn't optimized for programs that don't do anything.
> So, it is an association list implemented using tables, where links are given by the __index property, using a metatable.
I think that's a matter of opinion. It's interesting that being able to form these simple hierarchies is emergent property of alists, but just because Lua provides another mechanism to implement hierarchical lookups, doesn't mean that the language designers were trying to ape alists. If anything, I'd assume that Roberto and company were inspired by Smalltalk's doesNotUnderstand message when they implemented __index metamethods.
Good question! I guess LuaJIT isn't optimized for programs that don't do anything.
> So, it is an association list implemented using tables, where links are given by the __index property, using a metatable.
I think that's a matter of opinion. It's interesting that being able to form these simple hierarchies is emergent property of alists, but just because Lua provides another mechanism to implement hierarchical lookups, doesn't mean that the language designers were trying to ape alists. If anything, I'd assume that Roberto and company were inspired by Smalltalk's doesNotUnderstand message when they implemented __index metamethods.