2. In JS, you shake fake trees, to shed bad fruit.
3. Common wisdom says: "Ye shall know them by their fruits."
Therefore, all JS dependency trees are rotten. /s
2. In JS, you shake fake trees, to shed bad fruit.
3. Common wisdom says: "Ye shall know them by their fruits."
Therefore, all JS dependency trees are rotten. /s
I don’t know about PHP, but both Python and Ruby have module/import semantics that explicitly allow functions to be smuggled across “visibility”/access boundaries. So they can’t really do this sort of optimization, at least not without breaking a whole bunch of real code.
Python and Ruby are aren't going to benefit (much) from the former and the latter doesn't apply, which is probably why it hasn't been a priority in either language.
[1] https://groups.google.com/g/comp.lang.lisp/c/pspFr1XByZk
https://ml.cddddr.org/scheme/msg00189.html
Lucid Common Lisp had a tree shaker as part of their delivery tool. That one was developed from 1988 onwards.
GWT was doing tree shaking for Java to JavaScript compilation before most JavaScript programmers had the tool chain for it.
The joke in college was that parent (processes) must be sure to kill their children, otherwise they turn into zombies. (Unix / POSIX model of processes)