2 ms·
You might know it as "dead code stripping": You remove all the things from the image that aren't used in your shipping app. Calling it "tree shaking" is web de
by nielsbot 1y ago
You might know it as "dead code stripping": You remove all the things from the image that aren't used in your shipping app.
Calling it "tree shaking" is web development term AFAIK.
- munificent 1y ago> Calling it "tree shaking" is web development term AFAIK. I think that's backwards. Lars Bak and the other V8 folks came from the Smalltalk world and brought the "tree shaking" term with them as far as I know.
- layer8 1y agoWikipedia claims that it originated in Lisp, and the oldest reference I can find is this from 1991: https://www.dreamsongs.com/Files/LispGoodNewsBadNews.pdf https://www.dreamsongs.com/Files/LispGoodNewsBadNews.pdf (section 1.6.3) In any case, before the JavaScript usage, it seems that treeshaking applied to objects to be included in a runtime image. The JavaScript usage is actually more akin to the dead-code elimination and link-time symbol removal of compiled and linked languages.
- nielsbot 1y agoInteresting. It's come full circle terminology wise.