3 ms·
And then, people start using reflection (Java), vtables/dynamic lookups (C, C++), eval (JS, PHP) and similar constructs (a lot of languages have them), and sudd
by mschuster91 3y ago
And then, people start using reflection (Java), vtables/dynamic lookups (C, C++), eval (JS, PHP) and similar constructs (a lot of languages have them), and suddenly tree-shaking falls apart.
Tree shaking shouldn't be necessary in 2024 anyway.
- icholy 3y agoCalling vtables "reflection" is a stretch.
- mschuster91 3y agoI was merely listing stuff that can break or severely restrict tree-shaking.
- icholy 3y agoApologies, I misread your comment. But can you elaborate on your statement that tree-shaking (more commonly referred to as dead-code-elimination) is no longer required?
- mschuster91 3y agoTree shaking was mostly a thing invented in the NodeJS ecosystem for websites to save transfer traffic and thus lead to faster page loads, as well as save a bit of RAM. Even budget phones routinely have more than 4GB of RAM, and high-speed Internet access is the norm, so you can get away with a lot more inefficiency than just a few years ago.