3 ms·
Of course. And if you are using any sort of 3rd party library, there's a good chance it has some bad design decisions in it. Having extension methods allows you
by wtetzner 7y ago
Of course. And if you are using any sort of 3rd party library, there's a good chance it has some bad design decisions in it. Having extension methods allows you to clean them up.
If the library is open source, you can of course try to contribute changes, but they may or may not be accepted, and maybe the library is in such wide use that they don't want to break backward compatibility.
- gambler 7y agoThis is the worst thing about Java. Almost all other languages have some way to deal with bad libraries or missing features in those libraries. Java has nothing of this sort and it gives library provides all kinds of tools to fuck you over.
- pjmlp 7y agoThe worst thing are developer that don't learn to use the tools that Java makes available at their disposition. In any language it is possible to fix broken libraries.
- pjmlp 7y agoNothing prevents one to achieve the same in Java with adapter classes or utility methods statically imported.
- wtetzner 7y agoThat’s true, but adapter classes can be pretty clunky to use, and while static methods are fairly lightweight, they aren’t very convenient if you’re trying to extend a fluent API.