[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dynamic vs. static typing
"Paul F. Dietz" <email@example.com> wrote:
>Anton van Straaten wrote:
>> Without early typechecking, the proportion of type errors which
>> manifest during testing and at runtime rises significantly - and
>> often, their nature isn't as clearly identified, so they take longer
>> to track down. Looking at this in terms of what percentage they are
>> of all possible errors is misleading at best.
>But is there any evidence to support the contention that the putative
>savings in debugging time exceeds the extra design and coding cost?
What extra design and coding cost?
The cost of the "extra keyboarding" (ahem) is negligable, particularly
in the case of type-inferencing languages.
You are going to have to design your data structures in any case and the
only real difference with static typechecking is that the comments in
your code describing the data structures are parsable.
 Unless, of course, you want to argue that physically pecking at the
keyboard is a significant fraction of the cost of developing software,
which is not the case anywhere I've seen. And with type-inferencing
languages, that only makes the cost slightly less negligible.
 And you're really going to hate that whole refactoring thing. :-)