From: Ray Blaak
Subject: Re: Why I don't believe in static typing
Date: 
Message-ID: <uisliv7n1.fsf@STRIPCAPStelus.net>
···@jpl.nasa.gov (Erann Gat) writes:
> > Blaming this failure on the language is really barking up the wrong tree.
> 
> You have badly misunderstood my point.  I do not blame this failure on the
> language.  I blame this failure on the mindset that because the compiler
> catches certain kinds of errors that you can get away with less testing
> than if it didn't.  In other words, I am not saying static typing is bad,
> just that one of the benefits that many people cite for it is not really a
> net benefit.

Race conditions and deadlocks can occur readily in either static or dynamic
languages.

If the programmer's mindset leads them to believe that concurrency issues
cannot occur just because things compile, then they are indeed incompetent, at
least with regards to concurrency.

They can be outrageously smart in other areas, but forgetting about
concurrency issues is a mistake, plain and simple.

I would imagine that after the mistake you describe, your smart programmer was
quite a bit smarter.

I would also imagine that your programmer's opinion of static typing is in no
way affected by the incident either.


-- 
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
········@STRIPCAPStelus.net                    The Rhythm has my soul.

From: Erann Gat
Subject: Re: Why I don't believe in static typing
Date: 
Message-ID: <gat-1711031704070001@192.168.1.51>
In article <·············@STRIPCAPStelus.net>, Ray Blaak
<········@STRIPCAPStelus.net> wrote:

> ···@jpl.nasa.gov (Erann Gat) writes:
> > > Blaming this failure on the language is really barking up the wrong tree.
> > 
> > You have badly misunderstood my point.  I do not blame this failure on the
> > language.  I blame this failure on the mindset that because the compiler
> > catches certain kinds of errors that you can get away with less testing
> > than if it didn't.  In other words, I am not saying static typing is bad,
> > just that one of the benefits that many people cite for it is not really a
> > net benefit.
> 
> Race conditions and deadlocks can occur readily in either static or dynamic
> languages.
> 
> If the programmer's mindset leads them to believe that concurrency issues
> cannot occur just because things compile, then they are indeed incompetent, at
> least with regards to concurrency.

The situation was that the programmer was making what appeared outwardly
to be a minor change to a piece of code that had run for months in a
production environment with no problems.  No one imagined that this
problem would happen.  Even after it happened, as I said, it took the
entire team the better part of a week to figure out what had gone wrong.

> I would imagine that after the mistake you describe, your smart programmer was
> quite a bit smarter.

Well, they're still using C++ so I don't know ;-)

> I would also imagine that your programmer's opinion of static typing is in no
> way affected by the incident either.

That is probably true.  Certainly the manager who insisted I write the
biller in Java was unmoved.

E.
From: Feuer
Subject: Re: Why I don't believe in static typing
Date: 
Message-ID: <3FBA2A5C.CD2BBD22@his.com>
Erann Gat wrote:

> > If the programmer's mindset leads them to believe that concurrency issues
> > cannot occur just because things compile, then they are indeed incompetent, at
> > least with regards to concurrency.
> 
> The situation was that the programmer was making what appeared outwardly
> to be a minor change to a piece of code that had run for months in a
> production environment with no problems.  No one imagined that this
> problem would happen.  Even after it happened, as I said, it took the
> entire team the better part of a week to figure out what had gone wrong.

The problem was not necessarily (or even likely) caused by the
programmer who made the apparently minor change.  It could well have
been caused by the programmers who built the original system.

David
From: Barry Margolin
Subject: Re: Why I don't believe in static typing
Date: 
Message-ID: <55rub.538$lK3.176@news.level3.com>
In article <····················@192.168.1.51>,
Erann Gat <···@jpl.nasa.gov> wrote:
>In article <·············@STRIPCAPStelus.net>, Ray Blaak
><········@STRIPCAPStelus.net> wrote:
>
>> ···@jpl.nasa.gov (Erann Gat) writes:
>> > > Blaming this failure on the language is really barking up the wrong tree.
>> > 
>> > You have badly misunderstood my point.  I do not blame this failure on the
>> > language.  I blame this failure on the mindset that because the compiler
>> > catches certain kinds of errors that you can get away with less testing
>> > than if it didn't.  In other words, I am not saying static typing is bad,
>> > just that one of the benefits that many people cite for it is not really a
>> > net benefit.
>> 
>> Race conditions and deadlocks can occur readily in either static or dynamic
>> languages.
>> 
>> If the programmer's mindset leads them to believe that concurrency issues
>> cannot occur just because things compile, then they are indeed incompetent, at
>> least with regards to concurrency.
>
>The situation was that the programmer was making what appeared outwardly
>to be a minor change to a piece of code that had run for months in a
>production environment with no problems.  No one imagined that this
>problem would happen.  Even after it happened, as I said, it took the
>entire team the better part of a week to figure out what had gone wrong.

Isn't that the case with many bugs?

I think you're focusing on the wrong programmer, and maybe that's where the
"cream of the crop" confusion is coming from.  Since the bug was always
there, the incompetent programmer was the one who wrote the original code
and left a race condition in it.

-- 
Barry Margolin, ··············@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Ray Blaak
Subject: Re: Why I don't believe in static typing
Date: 
Message-ID: <ullqdefxv.fsf@STRIPCAPStelus.net>
···@jpl.nasa.gov (Erann Gat) writes:
> The situation was that the programmer was making what appeared outwardly
> to be a minor change to a piece of code that had run for months in a
> production environment with no problems.  No one imagined that this
> problem would happen.  Even after it happened, as I said, it took the
> entire team the better part of a week to figure out what had gone wrong.

And this is quite normal, even for smart programmers. Concurrency is
*hard*. It really really is. 

You almost have to do (pseudo-) formal correctness proofs constantly to be
sure things are ok. Using a language with decent concurrency support helps
too, of course.

What this example is definitely not, however, is an example of a disadvantage
of statically typed languages.

-- 
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
········@STRIPCAPStelus.net                    The Rhythm has my soul.