[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dynamic vs. static typing
Jim Blandy <jimb@redhat.com> writes:
> Joe Marshall <jrm@ccs.neu.edu> writes:
>> > Also, in an evolving system, providing static information that turns
>> > out to be incorrect may be more costly than if we didn't bother to
>> > encode that information explicitly (an arguable point).
>>
>> Any time you ask someone to provide redundant information, you strictly
>> increase the error rate.
>
> Errors detected statically and errors caught at run-time shouldn't be
> lumped together. Adding type information increases the rate of false
> positives (errors reported for correct programs), but decreases the
> rate of false negatives (errors not reported for incorrect programs).
That depends on the type checker. Some of them are anal enough that
there are no false negatives.
> Since the latter are only discovered at run-time, they're much more
> important to reduce.
>
> (I *think* I thought that through right. No?)
>
> But what you wrote is a great argument for type inference over
> explicit annotation.