7 ms·
>For example, the main "customer" of the module system is the JDK itself As mentioned in TFA, "The general advice seems to be that modules are (should be) an i
by executesorder66 11mo ago
>For example, the main "customer" of the module system is the JDK itself
As mentioned in TFA, "The general advice seems to be that modules are (should be) an internal detail of the JRE and best ignored in application code"
So yeah, why expose it to those who are not the "main customer"?
- vips7L 11mo agoIt’s just too complex. They should have went with the internal modifier.
- SerCe 11mo ago> So yeah, why expose it to those who are not the "main customer"? How did modules affect you as a user? I'd guess that you had to add `--add-opens`/`--add-exports` during one of the JDK migrations at some point. And the reason you had to do it was that various libraries on your classpath used JDK internal APIs. So modules provided encapsulation and gave you an escape hatch for when you still have to use those libraries. How else would you do it while still achieving the desired goal?