brodycj / ask-me-anything

ASK ME ANYTHING such as support, ideas, or personal questions
Creative Commons Attribution 4.0 International
4 stars 1 forks source link

💡use macros in JavaScript (...) #35

Open brodycj opened 3 years ago

brodycj commented 3 years ago

Coming from this PR: https://github.com/apache/cordova-lib/pull/871

I noticed a case of code that was expanded when migrating from underscore to more modern JavaScript, suspect this would happen in other places.

Adding more small utility functions, and publishing some on npm for reuse would be one solution. I think this would add non-zero overhead with most if not all JavaScript interpreters.

I think using macros would further improve this situation. I found some interesting resources: