3 ms·
These are different things for a different purpose. Data encapsulation, as defined in OOP, is obsolete, I think. Namespacing is related to modular programming,
by js8 9y ago
These are different things for a different purpose. Data encapsulation, as defined in OOP, is obsolete, I think.
Namespacing is related to modular programming, which is still useful even in functional programs (it makes sense to group related data and functions together for organizational purposes). Interfaces serve a different purpose yet, to do a dispatch based on type.