anomaly

Skip Montanaro skip.montanaro at gmail.com
Mon May 11 11:48:32 EDT 2015


On Mon, May 11, 2015 at 10:11 AM, zipher <dreamingforward at gmail.com> wrote:
> I also bought the idea of everything as an object, it has a unbeatable purity to it.  But we won't ever get to the point were OOP is like the purity of math because the greatest utility of OOP is working with real-world data.  And that real-world puts bounds on the otherwise abstract purity in which a language is theoretically capable.

Did someone here say it would? Sure, OOP isn't as pure as math, but
most object-oriented languages aren't pure OO languages, either.
(Maybe Smalltalk?) In Python, when you want to manipulate bazillions
of numbers, you use numpy, pandas, etc. In C++, you code in the C
subset it (still) contains when you don't want objects.

The practicality side of things suggests that even though
everything-is-an-object isn't perfect, it may be good enough.
People/projects/companies generally can't afford to follow every
change that blows through their environment. That's why (for example),
COBOL lasted so long. In fact, I suspect you could still make a good
living writing COBOL, if you really wanted to. (Searching indeed.com
for "COBOL" in Chicago, IL gave me 81 hits.)

Python was never meant to be "pure". It has, by Guido's own admission,
borrowed ideas from many other languages. Very little in Python is
truly new, certainly not its object model. At the user level
everything appears to be an object, but not everything is under the
covers (e.g., numeric elements of array objects).

Skip



More information about the Python-list mailing list