Comment by executesorder66

Comment by executesorder66 3 days ago

2 replies

>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"?

SerCe 2 days 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?

vips7L 2 days ago

It’s just too complex. They should have went with the internal modifier.