logoalt Hacker News

IAmLiterallyABtoday at 5:42 AM2 repliesview on HN

For the old version support. Why not do some compile time #ifdef SUPPORT_ES3? That way library writers can support it and if the user doesn't need it they can disable it at compile time and all the legacy code will be removed


Replies

Griffinsaucetoday at 7:26 AM

Two problems: - people would need to know how to effectively include dependencies in a way that allows them to be tree shaken, that's a fragile setup - polyfills often have quirks and extra behaviours (eg. the extra functions on early promise libraries come to mind ) that they start relying on, making the switch to build-in not so easy

Also, how is this going to look over time with multiple ES versions?

ascorbictoday at 7:33 AM

It'll still install the dependencies, which is what this is about