Python Productivity over C++

Neel Krishnaswami neelk at brick.cswv.com
Sun Jun 11 18:11:23 EDT 2000


Cameron Laird <claird at starbase.neosoft.com> wrote:
> 
> On the other hand, I'm still searching for the best way to speak
> about the "well you Python people only find those errors at
> run-time" objection.

IMO, this objection is only valid when coming from an ML or Haskell
programmer, because misfeatures in the design of C++ and Java's type
systems undermine their semantic soundness to the point that their
static typing doesn't offer any benefit to speak of.

C++ has unsafe casts to kill whatever pretensions to type-safety the
language has. Java fixed this by raising exceptions on invalid casts,
but followed C++'s braindamaged example by including a null as a
member of every object type. 

Argh! Argh! Argh! This means that just about every invariant you care
to name no longer holds, because a variable with a particular object
type can't be guaranteed to behave sanely when a method that's a part
of that class's protocol is invoked on it. Now, what was that about
strong typing in Java reducing runtime errors?

We've known how to do better for decades, but we don't. I think our
only hope would be to give CAR Hoare absolute veto power over the
design of any new strongly-typed language....


Neel



More information about the Python-list mailing list