Replies: 2 comments
-
Thanks for reporting @redbar0n. Nice to see an overview of these duplicated pieces of code! It may be possible to extract some helper function to reduce duplication. Of course this extraction could also introduce extra overhead/complexity and may have a negative impact on performance, so we should be pragmatic in that regard and see if there is a real improvement over all. Anyone interested to see whether we can do some deduplication in the code base? Help would be welcome. |
Beta Was this translation helpful? Give feedback.
-
I think this more for general discussion of the code base/code quality than a specific actionable item, so moving to Discussions. |
Beta Was this translation helpful? Give feedback.
-
I recommend running jsinspect to reveal opportunities for refactoring duplicated / copy-pasted code in math.js. Since jsinspect found 115 such cases, in math.js v6.6.4, there must be at least some real opportunities for refactoring. The benefit would be reducing the complexity of the code (a win for onboarding new devs to the project), and the size of math.js (a win for everyone using it).
Example:
Beta Was this translation helpful? Give feedback.
All reactions