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

Re: dynamic vs. static typing




On 24 Nov 2003, at 22:21, Joe Marshall wrote:
>
> Any time you ask someone to provide redundant information, you strictly
> increase the error rate.
>

No, I don't think so. Provided that you have the right idea of the 
thing you want to say, redundancy can be a win because it is not very 
likely that you describe the thing in a wrong way more than once. 
Especially when you provide two different perspectives on the same 
thing, and these views are compatible, it's more likely that you have a 
right idea.

I think this is the only _real_ advantage that static type systems 
provide. They provide two perspectives on the same code that are 
different in interesting ways. When these two perspectives match, you 
get a sense that you are up to the "right thing". And this is what 
static type systems have in common with, say, unit tests, or any other 
technology that provides interesting new perspectives on your code.

The central misunderstanding of ST advocates is that the interesting 
aspects of static type systems are a) that they have anything to do 
with preventing bugs and b) that they are automatic. Both aspects 
disregard that programming is essentially a human activity. The 
interesting aspect of a static type system is that you create two 
different perspectives on the code you write and that you have a way to 
check whether these two perspectives match.


Pascal

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