Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!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: 3 May 91 03:28:05 GMT References: <3865@ssc-bee.ssc-vax.UUCP> <530@eiffel.UUCP> <1991Apr28.022234.287@odi.com> <2604@calmasd.Prime.COM> Sender: rockwell@socrates.umd.edu (Raul Rockwell) Organization: Traveller Lines: 26 In-Reply-To: cpp@calmasd.Prime.COM's message of 2 May 91 22: 58:12 GMT Chuck Peterson: > Perhaps statically typed languages should be used like assembly > language, where the added security (as with performance for > assembly) justifies recoding. (Perhaps both security and > performance in some measure.) Perhaps I'm missing some fundamental insight, but I fail to see how static typing provides any sort of security. Consider an arbitrary program, with (for example) several thousand variables and a few dozen types. If the program says: f(x), what does static typing buy you, security-wise? You can only misidentify x a few hundred ways instead of a few thousand? (Awesome reliability there). Unless you are intending to allow only one instance of a type in any lexical name-space? That would be security! [And you'd be writing your program at least twice, once in "type expressions", and once in "imperative expressions". There's nothing quite like trying to keep two versions of the same thing in sync to improve reliability...] Performance, you can get, to the extent that your compiler pre-computes the results of your program. ("Static typing" means evaluate "type expressions" at compile time). Raul Rockwell