Newsgroups: comp.object,comp.lang.c++,comp.lang.ada,comp.lang.smalltalk,comp.lang.eiffel
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!newsfeed.internetmci.com!news.magg.net!news.bridge.net!uunet!in2.uu.net!uucp4.uu.net!allegra!akalice!ark
From: ark@research.att.com (Andrew Koenig)
Subject: Re: OO, C++, and something much better!
Message-ID: <E4zL83.GAr@research.att.com>
Organization: AT&T Research, Murray Hill NJ
References: <JSA.97Jan24191048@alexandria> <32E999AE.2F68@parcplace.com> <32ED02EE.22E2@netright.com>
Date: Sun, 2 Feb 1997 17:43:15 GMT
Lines: 37
Xref: glinda.oz.cs.cmu.edu comp.object:60756 comp.lang.c++:245150 comp.lang.ada:57095 comp.lang.smalltalk:50806 comp.lang.eiffel:18143

In article <32ED02EE.22E2@netright.com> david_nospam@netright.com writes:

> 	Baloney boomerang.  You've made dozens of counterintuitive claims for
> dynamic typing( smalltalk in particular ) and supported zero of them. 
> In fact, people on the static typing 'side' of the issue, such as Fergus
> Henderson, have provided good data with compelling arguemnts for static
> typing.

Let me weigh in with an anecdote.  Once upon a time, I saw a demonstration
of a prototype for a telephone switch that was written entirely
in a dynamically typed language.  I expressed surprise that a high-reliability
application like that would forego compile-time type checking, but the
developers assured me that type errors just weren't a problem in practice.

During the demo, they showed how the dynamic nature of the language made it
possible to add features to the switch while it was running, and even while
calls were in progress.  As an example, they redefined the record that described
a call in progress so as to include the time the call had started.  They then
changed the code that terminated a call to make it comput how long the call
had been in progress, for billing purposes.

They did all this while a call was in progress.  I was very impressed.
Then they terminated the call that was in progress.  The switch crashed.
I was even more impressed (but with a different sign).

The reason for the crash was that the record for that call was of the
old call-record type.  When the new call termination code executed,
it looked for the call start time and didn't find it.  The run-time
system therefore returned an error value, which crashed the switch when
used as an operand of a subtract.

I pointed out that the switch had just crashed because of a type error.
The response: ``Oh no -- that wasn't a type error; that was a data error!''
-- 
				--Andrew Koenig
				  ark@research.att.com
				  http://www.research.att.com/info/ark
