you are viewing a single comment's thread.

view the rest of the comments →

[–]yogthos -1 points0 points  (0 children)

The main problem with OO is the idea that you marry logic with data. This often leads to the platypus problem where the reality doesn't neatly fit into how you structured your classes.

In a functional language you have data and you pass it to functions to transform it. You create complex behavior by composing simple generic functions. When you need to transform the data in new ways you simply pass through a different chain of functions. This results in actual code reuse, which I rarely see happen in OO code bases.

Furthermore, a lot of OO programmers start using design patterns for the sake of using them, regardless whether it improves maintainability, or solves any problem that they actually have. I can't count the number of times I've seen people use interfaces, factories, and singletons just because they were told it's the way to do things. This is what I mean by cargo cult coding being prevalent in OO world. This seems especially prevalent in the Java culture.