Type Safety (was Re: fun and empowerment)

Jarvis, Robert P. (Contingent) Jarvisb at timken.com
Fri Jan 28 16:32:29 UTC 2000


> -----Original Message-----
> From:	Mark Guzdial [SMTP:guzdial at cc.gatech.edu]
> Sent:	Friday, January 28, 2000 8:59 AM
> To:	squeak at cs.uiuc.edu
> Subject:	Re: Type Safety (was Re: fun and empowerment)
> 
> > > Does anyone know of any empirical evidence for the value
> > > of types?
> > > Or is it a myth that we invented to rationalize the typing
> > > needed to improve the compiler's performance?
> >
> >Peter Norvig's book "Paradigms of Artificial Intelligence Programming:
> Case
> >Studies in Common Lisp", 1992, Morgan Kaufman Publishers Inc. comes out
> >strongly in favour of type-declarations, citing a case on page 318 where
> >various hints to the compiler give a 40x speedup, so I see no need to
> >rationalize.
> 
> I do believe that types lead to better compiler output -- I agree, no 
> need to rationalize that.  The "value" that I'm questioning is that 
> types lead to more bug-free code, that types "catch errors at compile 
> time."  That claim seems untested yet, and I'm not even sure where it 
> came from.  Is it a rationalization, e.g., "Well, we have to have 
> types to make the code better -- let's claim that it's good for the 
> programmer to use types! Improves their thinking, let's say!"  Well, 
> maybe...
> 
I thought the findings in Prechelt and Tichy's paper
(http://wwwipd.ira.uka.de/~prechelt/Biblio/tcheck_tse98.ps.gz) were
interesting, and I think it would be useful to see this sort of study done
with Smalltalk as the language instead of C.  (Summary: Prechelt and Tichy
found that programmers made fewer parameter type errors with ANSI C than
with K&R C when working with the Motif libs).  This would, of course,
require the development of a compile-time typing system for Smalltalk.
Sounds like something that could keep a couple of your students busy for a
couple semesters, Mark.  :-)

Bob Jarvis
Compuware @ Timken





More information about the Squeak-dev mailing list