Originally Posted by AlleyKat
in your way I must
Code:
local title = ...;
local M = _G[title];
|
So... adding one line of code is worse, in your mind, than adding multiple extra lines of code
and adding the overhead of multiple metatables in your original example?
Originally Posted by AlleyKat
Standard metatable functions
in frame case we redirect all get and set notfound operations to build-in
in build-in we adding frame api
and now we don't care what table to use, coz they are same
|
This is just bad programming. If you want to be able to use two variables to refer to the "same" object, just create one object and point two variables to it. Creating two objects and using metatables to make them act like the same object is just ... I don't even know where you came up with such a convoluted idea. There's no benefit to doing this whatsoever. Then again, there's no benefit to having two variables in the same scope that refer to the "same" object, either, other than purposefully making your code more complicated and difficult to read.