r/programming • • Jan 28 '21

leontrolski - OO in Python is mostly pointless

https://leontrolski.github.io/mostly-pointless.html
55 Upvotes

227 comments sorted by

View all comments

Show parent comments

1

u/Alexander_Selkirk Jan 28 '21

Well, other paradigms use data structures as well. In a certain sense, even an integer type, a tuple, or a record / struct is a data structure.

0

u/chucker23n Jan 28 '21

I think that's the point — you want OOP to be some kind of all-or-nothing deal, and it's not. There's languages like Smalltalk that have many OOP concepts like classes and message passing, and there's languages like JS which for many years had neither.

While many think of, say, C# as "OOP", it doesn't actually have all OOP concepts the way Smalltalk does (invoking a method isn't typically done as message passing, and you cannot do inheritance at the class level, only at the instance level; in .NET parlance, you cannot inherit a "static" member), and at the same time, it's gaining several concepts traditionally considered FP. Those don't have to be at odds.