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

Re: the forward method [dynamic vs. static typing]

Joe Marshall writes:
> John Clements <clements@brinckerhoff.org> writes:
> > Typically, type systems help you to construct a proof that certain
> > errors cannot arise during evaluation.  When parts of that proof are
> > used to alter the evaluation itself, you suddenly have a class of
> > _runtime_ errors (or rather, "mis-behaviors") that can only be
> > understood by examining the type proof.
> I think that John has identified what it is that made me
> uncomfortable with this style.  I generally think of the type system
> as meta information.  Intertwining the control flow with the meta
> information about the value flow not only makes it hard for humans
> to reason about the program, it makes it hard for programs to reason
> about it as well.

But OO languages already permit this sort of computation! If
you CPS-converted Ken's example, then all of the cases in which
the behavior depended on the return type would turn into cases of
argument type dispatch. Am I misunderstanding your point somehow?

Neel Krishnaswami