You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I earlier made an attempt at using Lua metatables to simulate classes and improve code maintainability.
An official standard way of doing so existed, and it was also done in some other TFM scripts.
Unfortunately, this had a very bad performance impact.
Metatables cause some algorithms to be as bad as 2 or 3 times more expensive at runtime.
Additionally, while the technique make a code LOOKS LIKE object oriented, it actually is not, which is misleading.
Also, the readability of the class code itself is questionable.
Therefore, to provide better performances and unify how my code looks like, I will be reverting those changes, and not implementing any new metatable.
The text was updated successfully, but these errors were encountered:
I earlier made an attempt at using Lua metatables to simulate classes and improve code maintainability.
An official standard way of doing so existed, and it was also done in some other TFM scripts.
Unfortunately, this had a very bad performance impact.
Metatables cause some algorithms to be as bad as 2 or 3 times more expensive at runtime.
Additionally, while the technique make a code LOOKS LIKE object oriented, it actually is not, which is misleading.
Also, the readability of the class code itself is questionable.
Therefore, to provide better performances and unify how my code looks like, I will be reverting those changes, and not implementing any new metatable.
The text was updated successfully, but these errors were encountered: