What is the semantics meaning of 'object'?

Chris Angelico rosuav at gmail.com
Tue Jun 25 18:57:49 EDT 2013


On Wed, Jun 26, 2013 at 8:38 AM, Mark Janssen <dreamingforward at gmail.com> wrote:
> Combining integers with sets I can make
> a Rational class and have infinite-precision arithmetic, for example.

Combining two integers lets you make a Rational. Python integers are
already infinite-precision. Or are you actually talking of using
"machine words" and sets as your fundamental? Also, you need an
ordered set - is the set {5,3} greater or less than the set {2} when
you interpret them as rationals? One must assume, I suppose, that any
one-element set represents the integer 1, because any number divided
by itself is 1. Is the first operand 3/5 or 5/3?

> That's a lot of power derived simply from using generic data
> structures, not some panzy generic meta-Object that doesn't do
> anything but tie people to an implicit type-theology.

Sure. And if you want assembly language, you know where to find it.
Personally, I don't want to have to code the fundamentals of data
structures in Python - that's C's job. The details of hashing
algorithms, fill factors, collision handling, and so on, are the
concern of the dict implementation, and unless there's a good reason
to dig into it (like when I'm explaining to my boss about a
hash-collision attack and why it means we have to upgrade to a newer
interpreter version), I don't care about the minutiae.

What you're doing is actually in the same theological / theoretical
level as what you're complaining of. It's equivalent to pointing out
that every single data structure you use, and every piece of
information in this world, can be represented with an aggregation of
the digits 1 and 0 - that's an awesomely powerful, clean, and
all-encompassing abstraction, but in day-to-day life, we really don't
need to think about it.

ChrisA



More information about the Python-list mailing list