Newsgroups: comp.object,comp.lang.c++,comp.lang.ada,comp.lang.smalltalk,comp.lang.eiffel
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!portc01.blue.aol.com!newsxfer3.itd.umich.edu!howland.erols.net!news.mathworks.com!news.kei.com!news.thenet.net!uunet!in1.uu.net!uucp4.uu.net!alexandria.organon.com!alexandria!jsa
From: jsa@alexandria (Jon S Anthony)
Subject: Re: OO, C++, and something much better!
In-Reply-To: Eric Clayberg's message of Mon, 27 Jan 1997 16:55:20 -0500
Message-ID: <JSA.97Jan28203152@alexandria>
Sender: news@organon.com (news)
Organization: Organon Motives, Inc.
References: <JSA.97Jan16141937@alexandria> <5buodl$bci@boursy.news.erols.com>
	<32E2FEC7.2F7B@concentric.net> <5bvncj$gqg$1@A-abe.resnet.ucsb.edu>
	<32E47B4B.56D9@concentric.net> <6PI998tV3RB@herold.franken.de>
	<32E68D40.65EC@parcplace.com> <JSA.97Jan24191048@alexandria>
	<32E999AE.2F68@parcplace.com> <32ED02EE.22E2@netright.com>
	<32ED2448.685A@parcplace.com>
Date: Wed, 29 Jan 1997 01:31:52 GMT
Lines: 113
Xref: glinda.oz.cs.cmu.edu comp.object:60508 comp.lang.c++:244023 comp.lang.ada:56745 comp.lang.smalltalk:50308 comp.lang.eiffel:17906

In article <32ED2448.685A@parcplace.com> Eric Clayberg <clayberg@parcplace.com> writes:

> David Hanley wrote:
> > Baloney boomerang.  You've made dozens of counterintuitive claims for
> > dynamic typing( smalltalk in particular ) and supported zero of them.
> 
> Counterintuitive to who? To someone who knows little about Smalltalk? To

Well, clearly from the messages, the most likely description for "who"
here is "someone familiar with strong type systems - static or
otherwise".  The Smalltalk aspect seems irrelevant.

> you maybe? A quick scan of the varied responses in this thread indicate
> that for quite a few people, these "claims" are quite intuitive and
> match their own real world experiences.

So?  A similar quick scan reveals "the varied responses in this thread
indicate that for quite a few people, these 'claims' are quite
COUNTERintuitive or even outright unbelievable and don't match their
own real world experiences".  Now what?  Yawn....


> It is the claim that Smalltalk is somehow less reliable than
> statically typed languages that I have seen zero support for (other
> than conjecture and innuendo).

The claim is not that ST isn't less reliable or that it is somehow
impossible to make a program in ST as reliable as a statically checked
strongly typed example.  The argument is really pretty simple:

1) It is possible to construct a rich and descriptively flexible
static type system.  This is obvious - it's been done many times.

2) It is possible to codify a lot of information (both "logic" and
otherwise) in terms of an integrated set of type declarations (aka
complete interface definitions) within such a type system.  This is
obvious as it's also been done many times.

3) It is possible to construct to a fairly large degree (say, 80+% or
more) a static description of a solution to a problem within the
context of and in adherance to the information provided by the types
of 2).  Again, this has been done many times.

4) It is possible to construct an _automated_ consistency checker
within the context of 1) for ensuring that the constructions of 2 & 3
are consistent.  What's more, this checker can run over the static
representations of 2 & 3.  Once more this is obvious - any semantic
analyzer is an example.

5) Application of 1-4 will lead to the discovery of many errors upon
the running of the static analysis.  These errors will include things
like "no such method for object O at invocation I" among several other
kinds.  If you have a somewhat nicer implementation, you may well also
get many "object O is not initialized before use" warnings/errors.
This too clearly happens all the time (GNAT is an example of something
that does both).

Clearly all the errors caught in 5) will never make it to the first
running example - before _any_ testing/debugging has commenced.  None
of these will even be in the picture.  However, it is definitely true
that not all errors (or even such errors) can be determined with such
a static analysis.  In these outlying cases, any decent statically
checked strongly typed language will require insertion of appropriate
_runtime_ (aka dynamic) checks (certainly Ada and Eiffel do this).
You still have to check this stuff with testing.  But many such test
cases are no longer relevant and, even more to the point, can't happen
in the fielded system even if one or more of those test cases was
overlooked.

Now, in the dynamically typed scenario, all those errors, including
things like "no such method for object O at invocation I" and "object
O not initialized before use at location L" have to have and pass
explicit tests in a test suite for the construction.  Such "full
coverage" automated test suite generation is a _lot_ more difficult
than simply doing the static analysis in the first place.  And if you
forget one, that is just one more bomb that the customer may well find
that was not even possible to find in the other scenario.

Is this "proof" that such statically analyzed systems are always more
reliable?  Of course not.  Is it hard evidence from many controlled
experiments checking and confirming that they are?  Well, hardly.
However, it _is_ evidence for the claim that "all things being equal"
(which they seldom are), statically checked, strongly typed systems
will exhibit fewer runtime errors than those which aren't.


> OK, then, back it up. So far, *you* haven't *proven* anything. The above

And neither have you.  So?  Come on - we all know that there just
_isn't_ any highly repeated(able) objective long term studies of such
multiple paradigm usage cross correlated across various domains with
"development speed", "error reduction", "maintenance improvement",
"future flexibility in enhancement", "correctness improvement", etc.
So, noone can even offer a lot of convincing objective evidence for -
much less *prove* - *anything* here.


> as Smalltalk, my experience (and that of many of the folks contributing
> to this discussion) is that the Smalltalk-based systems are usually much
> more reliable in practice.

Yawn - just some more unsubstantiated anecdotal claims.  You're doing
the very thing you are berrating the "other side" for...


/Jon
-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com

