Type Safety (was Re: fun and empowerment)

Lex Spoon lex at cc.gatech.edu
Tue Feb 1 17:19:31 UTC 2000


"Richard A. O'Keefe" <ok at hermes.otago.ac.nz> wrote:
> The Haskell experience is otherwise.  The main issue for rapid
> prototyping is "how much code do you have to design, code, and test",
> NOT how much of it is type declarations. 


But there is another issue you are ducking, and that is that you have to
constrain your program to be typable at every step of the way.  If you
are prototyping, you may want to have partially-implemented classes
floating around, or make a change in one class but not echo it
immediately to every other class that shares that interface.

In short, types impose overheads other than the effort of typing them
in.

In fact, from reports on the newsgroups, Haskell is especially difficult
to work with when you are using lots of type inference--you get compiler
errors that are really tough to understand if you don't know the innards
of Haskell's type inference algorithms.  Many people have suggested that
when you run into this, you should just start adding types manually
until you either find the problem or the compiler stops complaining.  In
either case, programmers seem to spend significant amounts of time
trying to appease the compiler instead of *running* the programs.

Of course the static typing does have some benefit.  But is it worth the
cost?



> What's in the library is
> perhaps the most important thing. 


Absolutely this is important, but you having a good library doesn't mean
you have to have static typing, nor vice versa.


> Does any sane programmer use
> Perl or Java because they are good *languages*?

Ouch!  This is slightly harsh.  Perl is a step up from the C, /bin/sh,
and awk that Unix programmers used to use all the time.  Java is a big
step up from C++.  So in both cases, people really do use them because
they are better languages.  Maybe not good, but better than what they
are used to.


Lex



PS -- any language where Carpel Tunnel Syndrome is a real problem,
should be taken out back and summarily executed.  Or maybe it's
programmers who don't make abstractions for the things they do all the
time.  Either way, IMNSHO, programming should *not* be dominated by
keyboard typing speed.





More information about the Squeak-dev mailing list