Re:What's worked in Computer Science (2015)
by charlysl on Wednesday November 29, 2017 @12:54PM
(#15809072)
"What I think would be best is some course on how to combine OO and FP paradigms to get the best of both worlds"
If you want to find out, read "Concepts, Techniques, and Models of Computer Programming". It's mindblowing. It answers that question exactly.
This is a dense but exceptionally written 1000 page book, but maybe you can just read section 4.8.5 to get an idea [1]. However, I think you will take more than just reading this bit, to understand the different models (many more than the 2 everybody talks about).
Section 4.8.7 is actually "Using different models together", with the key "impedance matching" concept.
The author sort of summarizes it here [2]
There is also a mooc in edx, but it just scratches the surface of what's in the book [3]
[1] https://books.google.com.vn/books?id=_bmyEnUnfTsC&pg=PA322&l...
Not sure what it is like for the industry at large, but from what I've seen a dominant paradigm in Java is to separate out model classes that are basically just structs with Service or Workflow classes that manipulate the data. It's questionable how much of that is still OO (at least when I started learning it the narrative was to put your code where your data is. POJOs are the opposite of that). Given say having a high level service that calls low level services and external system while returning a result produces code thats very easy to trace and provides solid abstraction to the calling code. Also if you've read Uncle Bob's data structure vs. Object dichotomy you'll see how Objects are objectively better in some scenarios, and OO languages give you powerful tools for objects.
That said 100% agree with you on horrible inheritance hierarchies. What I think would be best is some course on how to combine OO and FP paradigms to get the best of both worlds (though tbh it'd probably be 90% FP with some OO).