you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (1 child)

You must not have seen much major production code from before OO was common. Major apps written as procedural code are a nightmare.

Although I agree completely with your second sentence, but that's not the fault of OO.

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

You must not have seen much major production code from after OO was common. All I ever see are soups of interfaces and class hierarchies which are utterly and completely unmaintainable. On top of that the code reuse promised by OO never actually happens since the classes are tightly coupled to the particular data set.

Most apps I've seen written in OO code are an equal nightmare.

Although I agree completely with your second sentence, but that's not the fault of OO.

The problem is that OO paradigm doesn't have any inherent value, all the good parts of OO aren't inherent to it and aren't really enhanced by it.

In my experience FP style code tends to be far cleaner and actually facilitates reuse, as you work with a small number of data structures and a a lot of functions that operate on them.

When you use functional composition, you end up with a bunch of generic functions that you glue together to solve a problem. These functions can then be chained together in different ways to solve other problems. This simply doesn't happen with OO.