[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the forward method [dynamic vs. static typing]
Tom Lord <lord@emf.net> writes:
> But, anyway, it wasn't _conciseness_ I attributed to DT but a unique
> (in some sense) minimalism of details -- avoidence of having to
> provide redundant information. How much do you have to say about a
> program in order to execute it correctly? ST languages require you to
> say more than that.
But how many undetectable ways are there to say a program such that it
executes incorrectly? DT languages give you more rope.
More generally, redundancy isn't inherently bad. (I don't mean to say
that you're claiming it is, but I want to explicitly make the point.)
The redundancy of ST, much like the redunancy of computing parity,
buys you early detection of certain classes of errors.
The lowest-redundancy, highest-entropy programs look like line-noise,
and a single bit error can render one incorrect without any hope of
being detected. (I'll let someone else take the obligatory whack at
Perl now.)
*Any* correctness assertions you can make about a program, whether
related to type or not, are redundant --- but can be a real lifesaver
when you're bughunting. (And of course, a Sufficiently Clever
Compiler (TM) can take advantage of all sorts of correctness
assertions, types and otherwise.)
Jeremy
(another fan of DT languages with optional type assertions)