Generics

goran.krampe at bluefish.se goran.krampe at bluefish.se
Mon Sep 29 08:46:10 UTC 2003


merlyn at stonehenge.com (Randal L. Schwartz) wrote:
> >>>>> "Göran" == Göran Krampe <goran.krampe at bluefish.se> writes:
> 
> Göran> Smalltalkers (and other developers fond of dynamically typed
> Göran> languages) have generally found that not having to type all
> Göran> that crude static stuff (and retype it when refactoring etc,
> Göran> cascading dependency changes blabla) gives us much more time
> Göran> to do more important stuff. We spend that extra time finding
> Göran> the *real* bugs instead - for example by writing good unit
> Göran> tests or whatever. So for us the advantages of dynamic types
> Göran> clearly outweighs the disadvantages. (I am generalizing here
> Göran> of course)
> 
> 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.

That is a good summary, yes.

> 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!
> 
> :-)

Exactly, test code is IMHO emerging as a much more capable "error
detection framework" than a static type system. And apart from being
capable of expressing much more interesting invariants than type
checking can do - it is optional. I only need to use test code where I
feel it is worth my time. Unless I am a total XP diehard of course. :)

regards, Göran



More information about the Squeak-dev mailing list