Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!udel!haven.umd.edu!socrates.umd.edu!socrates!rockwell From: rockwell@socrates.umd.edu (Raul Rockwell) Newsgroups: comp.lang.misc Subject: Re: Run-time Type Errors in Smalltalk Message-ID: Date: 20 May 91 13:11:17 GMT References: <1991May13.061520.11992@daffy.cs.wisc.edu> <1991May20.172441.780@csc.canterbury.ac.nz> Sender: rockwell@socrates.umd.edu (Raul Rockwell) Organization: Traveller Lines: 44 In-Reply-To: chisnall@cosc.canterbury.ac.nz's message of 20 May 91 05: 24:40 GMT Douglas E. Quale: > This statement suggests that programs compiled in dynamic > languages contain more type errors than similar programs written > in statically typed languages. ... Michael Chisnall: [ see previous article for CACM reference and background ] I think that a distinction that it may be useful to draw here is between declarative languages (e.g. prolog, ML, hope, miranda, smalltalk) which have a highly modular structure, and non-declarative languages (such as pascal, fortran, cobol, ada) which tend, imho, to give rise to rather long-winded programs. Gannon's results can be seen as a demonstration, then, that static typing is definitely better for nd languages (which is his under- lying model). Hmm... yes. The way I remember this group of threads started off with the assertion that dynamically typed languages were less error prone than statically typed languages because (paraphrasing slightly) dynamically typed languages are more declarative in nature. Maybe the emphasis should have been on declaratively typed languages vs. non-declaratively typed languages :-)? Douglas E. Quale: > Dynamic typing makes program components easier to test > interactively in isolation... Michael Chisnall: I don't see this at all. What has typing got to do with testing program components. It seems to me that far more important than the type system is whether the language is declarative (i.e highly modular) or not. ... Am I the only one interested in pointing out that an infinite loop is a type error? Consider a recent bug I encountered: a 'continue' inside an 'if' statement which should have been outside -- without the continue the code would occasionally fall through to a different state and would never terminate. Yeah, that was in C, but testing is the only real good way to find statements out of order. Raul Rockwell