3 ms·
I use classes as syntactic sugar to a pure functions. People like their objects, but if you treat them as immutable struct data everyone is happy.. well at leas
by kuchenbecker 3y ago
I use classes as syntactic sugar to a pure functions. People like their objects, but if you treat them as immutable struct data everyone is happy.. well at least less unhappy.
- Leo_Germond 3y agoIf you care about visibility control and minimalistic API design, then the most basic OOP features also provide a set of simple but powerful features: encapsulation, and contextual info on overload resolution (A.foo() is the foo() from A's type, no just any foo that can take A)