Generics

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Sep 29 01:54:25 UTC 2003


merlyn at stonehenge.com (Randal L. Schwartz) wrote:
	Precisely.  I keep arguing in public forums when I can that "static
	typing is neither necessary, nor sufficient, and comes at a net cost
	of productivity".  It's the wrong axis to optimize along.
	
	Not sufficent, because no amount of type checking can solve the "these
	two integers must sum less than 5 at all times" style of correlations.
	Therefore, you must write tests.  And if you're writing tests, type
	checking is not necessary!
	
I like Smalltalk (and Erlang and Prolog) a lot, so don't take this as
any kind of attack on Smalltalk or any suggestion that Smalltalk _ought_
to have types, but Randal L. Schwartz is only half right here.

ESC/Java (the Extended Static Checker for Java; there is also an earlier
version for Modula-3) *can* solve the "these two integers must sum to
less than 5 at all times" style of correlations.  ESC/Java is, and is
intended to be, somewhere between a type checker and a program verifier.

Testing is important, but for situations where high reliability is
really needed [%], it's not enough.  You need static checking AND testing
because each catches problems the other doesn't.

[%] if high reliability were needed everywhere, some large software
companies wouldn't have a market, would they?



More information about the Squeak-dev mailing list