4 ms·
It is, to some extent, Java's 'fault' although it's fuel for endless flamage how much that is a fault. Some stuff is just plain verbose, in part due to lack of
by pvg 17y ago
It is, to some extent, Java's 'fault' although it's fuel for endless flamage how much that is a fault.
Some stuff is just plain verbose, in part due to lack of type inference -
EndlessParametrizedType foo = new EndlessParametrizedType()
As to the APIs, some of it is due to excessively baroque APIs. But even with a well-designed API, in order to provide a reasonable amount of flexible functionality, a lot of the internal structure of the implementation is often exposed so it can be accessed. This is a consequence of static typing - in a dynamic language, you're more likely to just reach into the bowels of an object and pull out, change or replace bits you want. This isn't an option in Java and a flexible API ends up being a composition of a lot of smaller APIs. In the standard library, it's often left to others to provide a simple layer on top that covers the base cases - for instance, Apache Commons mail for Java Mail.