3 ms·
I definitely hate solution number 2. One major problem I find with OOP is that it is often requiring refactoring. Every time you shove something into an object
by goalieca 11y ago
I definitely hate solution number 2.
One major problem I find with OOP is that it is often requiring refactoring. Every time you shove something into an object you actually take away from it.
One thing that greatly inspires me from Haskell is that it does have design patterns, but they are based on category theory. Math is the ultimate tool. I don't think we can accidentally "create" something as richly descriptive for describing the benefits and problems for using a certain pattern.
- jimbokun 11y agoI'm having trouble understanding your definition of "refactoring", then. When I refactor, it's almost always to eliminate repetition and make the code more concise. But doesn't the same thing happen in a functional program? If you find the same code twice, refactor into a single function.
- goalieca 11y agoI'm getting at the idea of having to rearrange the code inside classes because your original assumptions have changed. Sometimes this involves moving stuff between classes. This is especially messy if the class has any member variables or relies on private functions.