[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: dynamic vs. static typing

Pascal Costanza wrote:
> Anton van Straaten wrote:
> > Pierce has a nice description of the subjective effects of static type
> > checks, in TAPL:
> >
> >    "In practice, static typechecking exposes a surprisingly
> > broad range of errors.  Programmers working in richly typed
> > languages often remark that their programs tend to "just work"
> > once they pass the typechecker, much more often than they feel
> > they have a right to expect.  One possible explanation
> > for this is that not only trivial mental slips [...] but also
> > deeper conceptual errors [...] will often manifest as
> > inconsistencies at the level of types."
> >
> > Anyone who's made serious use of a language with a good static
> > typesystem has experienced this.  Think of it as a way to get
> > an entire class of high-performance unit tests without having
> > to actually write them.
> While it's certainly true that there is a critical mass of people
> who find static type systems liberating and empowering, I recall
> reading statements by people who have made the opposite experience.
> They have found dynamic type systems to be liberating and empowering -
> and they include people who have tried languages with advanced H-M
> type systems.
> So going from a subjective assessment to a claim about "anyone"
> is not valid.

I didn't claim that anyone who had experienced the effect described by
Pierce would decide that ST systems were unequivocally better.  But I am
making a stronger claim than Pierce: that anyone who has made significant
use of a good static type system has experienced the effect Pierce

Calling it a subjective assessment is a little misleading: it's a real
effect, but it's difficult to describe in a brief summary, and I doubt many
people appreciate how complex it is.  So the main way in which this effect
is communicated is in the subjective sense, "wow, my programs just work".