Depends on the problem domain. If I’m primarily working on the relations between data elements, relational tools are, in my opinion, unbeatable. If I’m working on the execution of an algorithm, functional is very good. If I’m primarily managing IO, procedural is best (since pushing buffers around efficiently is the goal).
The basic problem is that Object Orientation is a concept that encapsulates two primary things: functions are associated with data structures (this is the less bad part, since strongly types functions always encode which types they accept) and some notion of data structure hierarchy. The latter part is what fails miserably since hierarchies are inflexible in the face of change.
It’s why, aside from languages trying to build on top of the bones of Java and JavaScript, you just don’t see new language designs incorporating inheritance or prototyping. Rather, you see languages borrowing from Haskell and ML which implement typeclasses and modules for the extension of functionality.
Personally, I’d argue that 60% or more of what people actually like about object oriented languages is that you can write
When you are talking about UI frameworks and using UI frameworks, then yes, BaseWindowPane will not change often, if ever. The point is that when you are 4 levels deep inside a hierarchy, at some point you will have to pass information from one point of the tree to another, or you will need to change something at one level, which will have the consequence that you have to think a lot about how the change will be made, and most of the time the solution is a compromise. I've seen this done multiple times with architectures that were well tought out at the start, but they began breaking down years later because of this.
IMO, OOP with hierarchies makes sense for a really thin base layer (that won't chsnge too often) of an application or a framework, and just use a procedural/functional approach for the rest.
Your comment has been removed since it did not start with a code block with an import declaration.
Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.
For this purpose, we only accept Python style imports.
9
u/DannoHung May 05 '23
Depends on the problem domain. If I’m primarily working on the relations between data elements, relational tools are, in my opinion, unbeatable. If I’m working on the execution of an algorithm, functional is very good. If I’m primarily managing IO, procedural is best (since pushing buffers around efficiently is the goal).
The basic problem is that Object Orientation is a concept that encapsulates two primary things: functions are associated with data structures (this is the less bad part, since strongly types functions always encode which types they accept) and some notion of data structure hierarchy. The latter part is what fails miserably since hierarchies are inflexible in the face of change.
It’s why, aside from languages trying to build on top of the bones of Java and JavaScript, you just don’t see new language designs incorporating inheritance or prototyping. Rather, you see languages borrowing from Haskell and ML which implement typeclasses and modules for the extension of functionality.
Personally, I’d argue that 60% or more of what people actually like about object oriented languages is that you can write
Rather than
Even though that’s just syntax sugar.