isinstance() considered harmful
Jason Orendorff
jason at jorendorff.com
Thu Jan 24 14:14:45 EST 2002
Kragen Sitaker wrote:
> Generally, though, even the try: except AttributeError: code is a
> mistake. There are exceptions.
Yes, I agree with that.
> > (b) it left room for writing much faster Python code in a
> > future version, the way explicit interfaces do; and
>
> Can you elaborate? Are you talking about vtables?
Yes.
> Well, there are three proven ways to get fast compiled code by having
> the compiler know what types it's compiling code for: [...]
>
> There's also a fourth way, Stalin-style type inference,
I didn't know there was a programming language named after Stalin.
How does it differ from Java?
I'll talk more about interfaces later. My question is,
are explicit interfaces considered harmful too?
## Jason Orendorff http://www.jorendorff.com/
More information about the Python-list
mailing list