3 ms·
I realize that is one thing that classes offer. My point is that you can achieve exactly the same thing with objects rather than classes. Very often when writ
by daviddaviddavid 15y ago
I realize that is one thing that classes offer. My point is that you can achieve exactly the same thing with objects rather than classes.
Very often when writing Python (or whatever) you'll create a class which is only ever instantiated once and the instantiation is done simply for the benefit of calling one method.
In such cases I find classes to be overkill. What I really want is the object. I don't need to factor the object's behavior out into a class.
Many of my sympathies are expressed much more thoroughly and eloquently in the many papers you can find online by Walter Smith outlining the motivations behind NewtonScript.