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

Re: dynamic vs. static typing

"Paul F. Dietz" <dietz@dls.net> 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.[1]

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.

Tommy McGuire

[1] 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.[2] And with type-inferencing
languages, that only makes the cost slightly less negligible.

[2] And you're really going to hate that whole refactoring thing. :-)