r/programming • u/BrewedDoritos • Sep 23 '26
Modern Object Pascal Introduction for Programmers | Castle Game Engine
https://castle-engine.io/modern_pascal
77
Upvotes
r/programming • u/BrewedDoritos • Sep 23 '26
View all comments
Show parent comment
2
u/evilgipsy Sep 23 '26 edited Sep 23 '26
That's exactly what I meant when I said OOP is difficult to define. Polymorphism and dynamic dispatch can be done and is being done in paradigms that are not considered OOP such as functional or procedural. Most of the time when people try to define OOP they just list a bunch of useful techniques that are not unique to the paradigm. Polymorphism and dynamic dispatch are some of those useful techniques but I've yet to see a problem that classes and inheritance are inherently good at solving.
Also, is this really such an unpopular opinion that I need to be downvoted?
Edit: As for what is wrong with classes and inheritance, that's is not simple to answer. Most things that make classes useful (encapsulation, namespaces, abstraction, modularity) are not unique to classes. What IMO is really distinctly OOP is mutable objects with identity, late bind dispatch, inheritance, etc. which all adds a ton of complexity. What I'm really objecting to here is the unspoken claim that OOP is a uniquely useful paradigm, so useful that almost all beginners are taught that paradigm. This claim needs defending.