From: Gareth McCaughan
Subject: Re: Why I don't believe in static typing
Date: 
Message-ID: <878ymduuhr.fsf@g.mccaughan.ntlworld.com>
Erann Gat wrote:

> In article <·················@news.level3.com>, Barry Margolin
> <··············@level3.com> wrote:
> 
> > In article <····················@k-137-79-50-101.jpl.nasa.gov>,
> > Erann Gat <···@jpl.nasa.gov> wrote:
> > >I can no longer recall whether the changes made to support credit card
> > >billing actually introduced the race condition or just changed the timing
> > >so that a problem that had actually been there all along began to manifest
> > >itself, but it doesn't matter.  The point is this: the more kinds of
> > >errors are flagged for you at compile time, the more you can get lulled
> > >into a sense of complacency and start to believe that if a program
> > >compiles without errors then it is actually free of bugs.
> > 
> > Well, if you have incompetent programmers, no language can really solve
> > that problem.
> 
> But that's just the thing: this wasn't a case of programmer incompetence. 
> The person who made the changes to the ad server that resulted in the
> problem was very smart, very competent. [...] These were the cream of the
> crop.)

"Incompetent" in this context doesn't -- or at least shouldn't --
mean "less competent than average" or even "less competent than
highly regarded experts". It means "insufficiently competent to
solve the problem at hand correctly". (There are problems for
which everyone is "incompetent".) Barry is right: if you have
a problem too hard for the people who are trying to solve it,
then no language will solve it.

I don't, on the whole, believe in static typing either, but
I don't really follow your argument. It seems to go like
this: "Type checking catches some errors early, so some
people may be fooled into thinking it catches all the errors
and therefore test and review less carefully, thus producing
more errors". I'd argue that people who do *that* are
incompetent, and that it is no criticism of a language
feature to say that it can do harm when misused.

It *is* a criticism of a language feature to say that
it encourages misuse, or that it is difficult not to
misuse, but I don't see how static typing has either of
those properties with respect to the variety of misuse
we're talking about here; having static typing doesn't
make testing impossible, or anything like that.

-- 
Gareth McCaughan
.sig under construc