[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dynamic vs. static typing
Joe Marshall wrote:
> If there is some feature of the language that cannot always be
> statically decided, and you are unwilling to restrict usage of the
> feature to the statically decidable cases, then there needs to be
> runtime support for that feature. If there is runtime support for a
> feature, then static support of the same feature, however desirable,
> is no longer strictly necessary.
Surely I don't need to tell you that this is what well-designed (and
sound!) typed languages do. For example, the type systems of most
typed languages don't even try to prove that array bounds will be
within checks. The run-time systems of most typed languages therefore
insert array-bounds checks.
> ...but this is a caricature. Any compiled language does *some*
> sort of static analysis.
I have to pick a nit with this terminology. *Languages* are neither
compiled nor interpreted. Individual implementations may take the
form of a compiler or interpreter (or god-knows-what these days).
Shriram