4 ms·
> What features are both present in all of JavaScript/Go/Python and absent from Java/Kotlin that have any relevance to the Gang of Four patterns? For example:
by Mawr 5y ago
> What features are both present in all of JavaScript/Go/Python and absent from Java/Kotlin that have any relevance to the Gang of Four patterns?
For example:
1. Being able to define a top-level function
2. Being able to return a function
These either shoehorn every codebase into OOP or force the usage of design patterns.
Mind you, it's possible that if you're writing strictly modern Java/Kotlin/whatnot then these are fixed/irrelevant, but that doesn't erase the billions of overengineered lines of code out there.
From [1]:
> Abstract factory adds another level of abstraction to factory method. While factory method abstracts the way objects are created, abstract factory abstracts how the factories are created. The factories in turn abstracts the way objects are created. You will often hear the abstract factory design pattern referred to as a “factory of factories“.
This type of insanity is exactly what the parent is referring to. Layers of needless abstractions that paper over the lack of basic features every other language has.
[1]: https://springframework.guru/gang-of-four-design-patterns/abstract-factory-design-pattern/ https://springframework.guru/gang-of-four-design-patterns/ab...