Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The rotation "class" should be reverted back to a table #5

Open
Tracked by #11
Pshy0 opened this issue Jul 9, 2023 · 0 comments
Open
Tracked by #11

The rotation "class" should be reverted back to a table #5

Pshy0 opened this issue Jul 9, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@Pshy0
Copy link
Owner

Pshy0 commented Jul 9, 2023

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.

@Pshy0 Pshy0 added the enhancement New feature or request label Jul 9, 2023
@Pshy0 Pshy0 added this to the v1.0 milestone Jul 9, 2023
@Pshy0 Pshy0 mentioned this issue Jul 9, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant