
Project Leyden – addressing Java’s slow startup time - simonpure
https://mail.openjdk.java.net/pipermail/discuss/2020-April/005429.html
======
PaulHoule
I think it's so ironic that you can tree shake the "dynamic" language
Javascript if you use the import system, but that you can't tree shake a Java
program because "static" Java programs almost always use reflection, if only
to get resource files that the standard library needs.

~~~
bitcharmer
I've been doing software engineering (predominantly java) for the last 20
years and I don't understand your comment. Could you please explain what you
mean by "tree shaking"?

~~~
PaulHoule
Javascript build chains can look at all the definitions in your project and
it's dependencies and can then remove the definitions that never get used.

This you can have 1000+ recursive dependencies and still wind up with an only
slightly bloated program in the end.

The same design feature also means that different dependencies can see
different namespaces so it is not such a deadly problem that dependency A and
depends cycle B both need different and incompatible versions of library C.

