3 ms·
Eh. Arguably in C++ you don't get proper encapsulation just with private members, because changing the layout for those members changes the ABI.
by deadbeeves 3y ago
Eh. Arguably in C++ you don't get proper encapsulation just with private members, because changing the layout for those members changes the ABI.
- adwn 3y agoDon't let Perfect be the enemy of Good. The quality of encapsulation you can achieve in C++ is miles ahead of that of C, even if it isn't all that could ever be.
- pjmlp 3y agoFor example, user defined types that behave like built-ins, while preserving invariants. Specially great in IoT instead of macros accessing directly IO ports.