A look into Object Oriented Programming and performance

“Second OOP” method you showed will lose to metatable OOP badly because you used it improperly
Second method is dependent on strict types
I made a post explaining them: Strictly typed <<Object Oriented Programming>> (Better than metatable OOP)
You should always use them in a strict mode
Constructor can be independent of class tho like in the example you showed, and you should probably reference it directly instead of “lib” or other shenanigans

1 Like