Hacker News new | ask | show | jobs
by junon 1857 days ago
Yeah this is just Rich Harris trying to sound smart it seems. I always had a problem with that exact quote because it's just another web-delusional attempt at reinventing the wheel with a flashier name.

Tree Shaking is dead code removal. They're one and the same.

1 comments

FWIW, this Twitter thread addresses this issue: https://twitter.com/Rich_Harris/status/1305925515472261122.

I certainly didn't _invent_ the term 'treeshaking', I merely (unwittingly) helped popularise it in the JS ecosystem. The relevant parts of the Twitter thread:

> the reality is that at the time i wrote that, when Rollup was in its early stages, minifiers empirically didn't eliminate as much code as Rollup did

> i think it's worth looking at this from the perspective of the respective terms' connotations, rather than the strictly technical definition (which i agree has been overstated; mea culpa for my part in that). DCE is something you do to programs; treeshaking is what you do to libraries. It may be the same thing, but the prevalence of the idea of treeshaking has put the onus on library authors to make their libraries DCE-able, in a way that has coincided with the adoption of ESM