4 ms·
The other thing about objects like this, is that the members b, c, d, and x, are actually global variables, within that object. Where any other method can overw
by blackrock 6y ago
The other thing about objects like this, is that the members b, c, d, and x, are actually global variables, within that object. Where any other method can overwrite its value at will, unless you force all modifications through another setter method, which will perform the error checking and validation.
This is fine, when your object is just a toy object you learn in C++ 101, in school. But it becomes quite unwieldy, when working with actual real world business data. Unless you minimize the footprint of your object.