
Do I understand classes and Objects? But why should I use it? - ProCode
https://dev.to/procode/do-i-really-understand-classes-and-objects-but-why-should-i-use-it-1lni
======
gumby
It's unfortunate that classes are always taught as if they were a structure
with some functions attached. That is one way to implement it. But object
orientation is a philosophy or approach to abstraction, that's all.

But the array approach may may sense when some of the data are infrequently
used. For example you could have a bunch of objects with people's names, ages
addresses and favorite food. You may frequently manipulate or examine those
names, ages and food preferences but only occasionally need the address. Your
accessors _name, _age, and _pref may look at an instance variable while
_address could look into the array.

