2 ms·
> Are OOP and "data-centric" approaches at odds with each other? Yes, because OOP Objects are data plus code (methods). If you don't have methods, but just pas
by inimino 7y ago
> Are OOP and "data-centric" approaches at odds with each other?
Yes, because OOP Objects are data plus code (methods). If you don't have methods, but just pass data around, you don't have OOP. If you do have methods, you meet the "expression problem".
If you have static types and well typed code you get pure data at runtime, and if you include unions and product or sum types at runtime, you end up with algebraic datatypes, and if you have RTTI and polymorphism and inheritance then you get classical OOP.
If you have just data living in memory at runtime, and just transformations of the data (functions) sitting in your code, then you get FP.