3 ms·
> To me, the advantage of OO is to give data objects methods so you can extract or modify what you want, how you want. Encapsulation is a trait of functional
by 9rx 2y ago
> To me, the advantage of OO is to give data objects methods so you can extract or modify what you want, how you want.
Encapsulation is a trait of functional programming. You don't need OO to create 'objects' that offer 'methods' to extract or modify the encapsulated data.
OO is all about message passing; that is what sets it apart from other programming concepts. If you don't allow messages from external sources (thus fundamentally requiring dynamic runtime behaviour), you can do boring old static binding which is going to be way faster.