Type Safety (was Re: fun and empowerment)

Lex Spoon lex at cc.gatech.edu
Fri Feb 4 00:02:11 UTC 2000


You say that you don't "feel" any constraints from static type checkers.
 But it's really not clear that you would.  As an extreme analogy,
someone who carried around a 60 lb. pack all the time would eventually
not notice it at all.


You even give a specific example of a cost to static typing:

> So you just _do_.  I do it all the time.
> It's no big deal.  Ok, in type checked code if there is a call to
> f there must be a definition of f, but it can be
> 
> 	f x = abort "f not implemented yet"

This line is clearly overhead that is required only because of static
typing.

As another example, suppose you have six implementations of the Foo
interface, and you decide to start tinkering with Foo.  Well, a static
type checker requires you to upgrade all six implementations in
parallel.  A dynamic checker would let you make changes to one
implementation, and then run the code immediately.



Overall, I'm not saying static typing is always bad.  But it clearly has
costs, and it's not obvious how much benefit it has.  It's a tradeoff,
and different people have different intutions about which way is better.



Lex





More information about the Squeak-dev mailing list