does __index = prototype is the same as __index = function(_, key) return prototype[key] end?
both __index = prototype and __index = function(_, key) return prototype[key] end achieve the same goal of delegating key lookups to the prototype table.
Although: __index = function(_, key) return prototype[key] end adds flexibility but with a slight performance cost due to the function call.
Thank you!! This text will be blurred
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.