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

Re: dynamic vs. static typing




On 25 Nov 2003, at 18:19, Anton van Straaten wrote:

> 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
> describes.
>
> 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".

I doubt it is possible to describe this in a long and detailed 
analysis. My impression is that you are describing what is essentially 
an esoteric experience. (My intention is not to use this as a 
pejorative term, but simply as the opposite of "exoteric".)

The pattern community uses the term "quality without a name" for 
similar experiences. There are ways to find out whether such 
experiences have objective content. See 
http://www.patternlanguage.com/archive/ieee/ieeetext.htm

Pascal

--
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."