[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the forward method [dynamic vs. static typing]
So, I know I'm sort of a member of the "peanut gallery" among such
illustrious list members but, if I may:
A good DT language minimizes (at least on one axis) the amount of
information a programmer must type to produce a program. It's "in
the direction of", so to speak, saying only what is essential to
communicate a program to a system that will run that program.
A good ST language introduces careful redundencies: the programmer
must add non-essential information to the program which may be used
both to optimize execution and to statically identify programmer
errors.
Those seem to me to both be worthy yet contradictory aims. Sometimes
I'll want more of the minimalism -- other times I'll want more of the
benefits of redundent expression.
The ST goal seems distinct from the DT goal in this regard: given a
model of the meaning of a program, a _minimal_ expression of that
program seems to me in some intuitive sense, unique (or near enough to
unique as to make for nevermind). But expressions of that program
that include redundent statements? Those seem to me unbounded in
number -- and so do the number of static verifications I could perform
-- and so do the number of potential optimizations I could implement
making use of those redundent statements.
So, in terms of language design, don't we inevitably have to converge
on some language(s) in which:
1) DT program expressions are possible.
2) There's an extensible set of static declarations, including
but not limited to types, with which I can augment my
program?
Rather than DT vs. ST being a polarizing dichotomy, isn't it more like
DT is some core around which we want to facilitate an open-ended range
of static declarations of various sorts?
So this polarization between supposed ST and DT camps (and I can't
help but to notice many people who can play devil's advocate for
either camp), shouldn't we really be focused on such "banal" questions
as:
1) extensible syntax for static declarations
2) extensible translators to make use of static
declarations
Why isn't Hindley-Milner just a compiler option?
-t