[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Any pitfalls to the nil index idiom?
- From: Oliver Kroth <oliver.kroth@...>
- Date: Tue, 19 Jul 2016 08:57:49 +0200
Interesting, but out of curiosity. Wouldn't
debug.setmetatable(nil,{__index = {}}) be faster and arguably simpler?
-- Thomas
I guess not. Lua would then try to look up the key in the empty {}
table, and fail
--
Oliver