Python 1.6 The balanced language

Darren New dnew at san.rr.com
Fri Sep 1 12:19:40 EDT 2000


Alex Martelli wrote:
> So, this needs to be specified anyway, quite apart from the "safe
> to collect" issue; it's a more general question of whether it's
> safe to *alter* objects through certain references ("collecting"
> being just one way to perform such alterations, albeit a very
> particular one).

Depends on what you mean by "safe". If by "safe" you mean "according to
specificiation of the problem", then yes. If by "safe" you mean what
language designers mean, which is "defined behavior according to the
language specification", then no.  

In other words, if you change an object to which I'm holding a reference,
I'll still do what you told me to. If you GC an object to which I'm still
holding a reference, you can't define the semantics of that operation.  It's
like the difference between saying "indexing off an array throws an
exception" and "indexing off an array overwrites the interrupt vectors with
random garbage". The first is still "safe", while the second isn't.

> but tying the "OO"ness
> of a language to it seems to be a typical case of "hidden agenda"

Uh... As I said, that was an Alan Kay quote.  If you don't know, Alan Kay
was arguably the guy who *invented* OO. It's hard to see how he could have a
hidden agenda against languages that weren't invented at the time.

> "subtyping exists" is another contentious issue, of course; if I
> removed "extends" from Java, requiring all polymorphous use to
> go through "interface" and "implement" (as, e.g., Coad has suggested
> as best design practice), would I "totally lose OO-ness"?  Are
> languages based on 'prototype objects' (with no classes at all)
> "not OO"?  Pah...

Well, Kay figured it was dynamic dispatch and GC. I personally think you
also need some sort of "class" concept, but I'm ambivilent on how much
inheritance you'd need. I've never used a system with classes and without
inheritance.

-- 
Darren New / Senior MTS & Free Radical / Invisible Worlds Inc.
San Diego, CA, USA (PST).  Cryptokeys on demand.
"No wonder it tastes funny. 
            I forgot to put the mint sauce on the tentacles."



More information about the Python-list mailing list