Lack of encapsulation, primarily, and lack of exte...
# stdlib
f
Lack of encapsulation, primarily, and lack of extensibility. If a piece of the SDK is unsuitable for your needs, how easy is it to craft a custom component to fit in its place? How many external or excess concerns do you have to worry yourself with in order to accomplish that? Take, for example, the
List
interface of Java's collections. How simple is it to create your own implementation? What kind of constraints are placed on the general concept of a list that are unnecessary at that level of detail? As an SDK construct, one would expect small, composable interfaces to enable usage of parts of functionality in different contexts, but the SDK encourages depending on vast swathes of functionality simultaneously with its bloated implementations. To be fair, I have a hard time gauging what exactly causes that inflexibility. Could be an overreliance on inheritance over composition, but I'm not sure. It's easily seen in the collections, as others have noted. Just take the SOLID principles, start wading through the SDK, and marvel at how incoherent the structure can be. Standard does not mean good. It means just that - standard, the foundation that everyone shares. Much like Java itself, it's used because everyone uses it, not because it is of high quality.