News for hackers. Stuff that matters.
Re:Printf(“%s %s”, dependency, injection) by matheusmoreira on Tuesday October 19, 2021 @06:19AM (#28916608)
Yeah. Java's design mistakes directly lead to these design patterns being used constantly to work around the limitations of the language. It's such a drag.

Even if you have static methods, you still need to use this stuff because they are methods, not functions. Classes aren't objects so they can't implement interfaces or be passed around as parameters. Gotta make things like singletons and factories because of this just so you can essentially pass a function pointer around. There's names for stuff that in better languages just happens naturally without people even thinking about it.

There are no comments on this comment yet.