3 ms·
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 yo
by samsquire 5y ago
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.
- bccdee 5y agoA 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.
- samsquire 5y agoIsn'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.
- deleted 5y ago[deleted]