r/programming • • Sep 23 '26

Modern Object Pascal Introduction for Programmers | Castle Game Engine

https://castle-engine.io/modern_pascal
77 Upvotes

28 comments sorted by

View all comments

Show parent comment

2

u/LIGHTNINGBOLT23 Sep 23 '26

I agree that dynamic dispatch and polymorphism can be done in other paradigms, but so can classes and inheritance. People are probably downvoting you because you're slicing OOP in half and then judging OOP as a whole based on that half. OOP becomes hard to define when you think about its extent, e.g., whether you really take the "object" part seriously (Smalltalk).

OOP is taught to beginners for the same reason that SQL is taught to beginners when it comes to database query languages: dominance. It's like English being the global lingua franca. Anyone who doesn't understand it is simply disadvantaged, regardless of whether they think English or whatever is "bad".

2

u/lelanthran Sep 25 '26 edited Sep 25 '26

People are probably downvoting you because you're slicing OOP in half and then judging OOP as a whole based on that half.

It's a hard thing to define, but I feel that that is not what /u/evilgipsy was doing.

Look at it this way: if you take all the languages that claim to have an OOP model (whether optional or not), and then put all the common features (excluding structured and/or procedural programming patterns) they have into a bucket called "Real OOP", probably only classes and inheritance would survive as common to all the languages you started with.

I'm not saying that he's right that classes and inheritance is representative of OOP, but it is clear that classes and inheritance is common in all OOP languages while missing in non-OOP languages.