3 ms·
One thing missing in the article is the all-or-nothing of dependencies in most languages. A package with millions of micro functions is nice, but if your progra
by TrianguloY 4y ago
One thing missing in the article is the all-or-nothing of dependencies in most languages. A package with millions of micro functions is nice, but if your program only uses 10 of them it doesn't matter, you program has all. Some dependency managers allows you to "disable" components, but they need to be manually picked and usually you can only disable chunks, not individual functions.
Wouldn't be nice to let the compiler package only the functions really used in the code and discard the rest? Do any language provide this? (C/C++?)
- dathanb82 4y agoIt's available (usually as an optional feature) in lots of languages where dependencies are linked statically. The most standard terminology I'm aware of for it is "dead code elimination" In Javascript, webpack (as well as other module bundlers) supports it, though they call their dead code elimination mechanism "tree shaking".