Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: Why I don't believe in static typing



In article <[EMAIL PROTECTED]>, Dirk Thierbach
<[EMAIL PROTECTED]> wrote:

> Erann Gat <[EMAIL PROTECTED]> wrote:
> 
> > But the ad-server was multi-threaded, and it turned out that
> > there was a race condition.
> 
> Nobody expects static typing to guard against race conditions.

Not consciously, no.  But tacitly, yes, I think people do expect this,
even if they don't realize it.

> You guard against race conditions by careful programming, and by
> planning in advance.

Or by putting in run-time sanity checks.  If I had had the foresight and
the strength of my own convictions I would have put code into the biller
that stopped the billing process immediately as soon as a request was made
to bill a ridiculously high amount, for some value of "ridiculously
high".  That would have solved the problem too.

Neither static nor dynamic typing would have helped in this situation. 
But I do believe that a dynamic typing *mindset* would have been more
likely to produce a correct solution because it encourages you to think
more about possible run-time errors.

E.



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.