3 ms·
The issue is that there are so many ways to do one thing with OOP. Programmers tend to add complexity when they can do OOP, so it's not the fault of OOP, but it
by jokoon 11y ago
The issue is that there are so many ways to do one thing with OOP. Programmers tend to add complexity when they can do OOP, so it's not the fault of OOP, but it's hard to teach good practices. In a way the problem is that OOP is too permissive. When you use a language, a nice feature is readability, but it's because the language encourages some practices.
In that regard, C++ is fine. Java is not.
Also a bothersome issue is people arguing that OOP is reusable, so that they invent all sorts of things that will be extendable, and then you see their code never being used ever again.
My opinion: don't teach OOP, teach software design. PLEASE.
- Hermel 11y ago> In that regard, C++ is fine. Java is not. You realize C++ is much more permissive than Java?
- jokoon 11y agojava encourages OOP. C++ only allows it.
- seanmcdirmid 11y agoI never create a class hierarchy or implementation layer as a reuse concern, even though this accusation comes up often (from naive FP people). It is totally just a way of isolating and modularizing complexity. If you want reuse, look elsewhere, like in libraries or components. Designing nice abstractions is hard in any paradigm: the last time I was in a room with the Haskell folks (like SPJ), they spent a lot of time talking about building elegant abstractions for solving problem X in Haskell, where coming up with those abstractions didn't seem easy at all. I don't think one can really teach reusable abstraction design like one can teach algorithms. There is no science behind it, there is no way to "measure" it. You can't create exam questions about it.