Re:The Repeated Deaths of OOP (2015)
by samsquire on Sunday June 06, 2021 @04:05PM
(#27415848)
Functions grouped with data is inherently OOP. Even if you don't interact with a graph of objects in a class, you're still using OOP if you define methods on your class and use those methods to interact with fields.
[ Parent
| on HN ]
A method on a class is just syntactic sugar for a function with an argument. It takes more than just "the presence of methods" for something to be OOP.
Isn't the grouping of methods with data a core fundamental principle of OOP? Even if it is syntactic sugar, Variables, Types, Classes, functions, method calls, structs are just syntactic sugar too. It just so happens that the syntactic sugar of grouping functions with data is OOP.