|
|
|
|
|
by scoopr
1857 days ago
|
|
The Web development scene is sometimes just so foreign thing to me. I've many times wondered, what does tree-shaking mean when listed in some features in some framework. I think I've looked up it in several occasions and it hasn't stuck with me. It throws me off as it sounds like some kind of ast fuzzing or whatever (perhaps like heckle in ruby). There is a perfectly good name for this that is used in many other contexts, called "dead code elimination", which is also fairly self-explanatory if you haven't come across the term before. |
|
That article claims that "tree shaking" is different because:
> Rather than excluding dead code, we’re including live code.
That's a misunderstanding of the term "dead code elimination". Classic dead code elimination techniques have always worked by first identifying potentially live code and then eliminating the rest.