[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
addendum about informality and tail recursion
Actually, I might even go so far as to elaborate the informal observation:
Informally, the substitution of continuations implements the effect of
a ``goto'' rather than a ``push'' to the new function (since the called
function replaces rather than joins the calling function in the execution
model), and therefore we might informally observe that
``stack is not consumed''.
Hidden in this tiny aside is my anger that one of the biggest effects
that I have seen in the way Scheme has taught people to think is that
they think "stack models are wrong" and "continuation models are
right", "tail recursion is right" and "iteration is wrong", etc. This
may not be the intent of the cogniscenti but it is the practical
effect I've seen on the legions of people who've been through scheme
courses. They get so lost in their "retraining" to understand the
"other" way of thinking that they eventually think the other way is
the only way. In my own small way, this wording request represents a
push on my part back toward restoring equilibrium by having a place to
point to in the Doctrine of All That Is Right and Good (i.e., the
Scheme manual) where words like "stack" and "goto" are used without
fear that the world will come to an end and perhaps even with the hint of
an idea that appeal to such metaphor can be a win.
The power is not in the choice of metaphor, it is in the ability to
shift among metaphors. Teaching people this other metaphor of
continuations but not leaving them with the flexibility to move freely
in and out is not having enabled them at all. So much time is spent
teaching these people about what tail recursion is about that they
come out not with an appreciation and understanding for "tail
recursion" as an alternate notation for "iteration" but instead with a
bogus notion that "iteration" is the enemy and must be beaten back at
all costs. They just speak a foreign language which no one else
speaks, and they're oh-so-sure it's THE right way, and ... sigh.
Long lost seem to be any of Steele's old Lambda papers, which used to
be what kept our generation's sense of humor in line. I think we take
it for granted that everyone will notice what Steele did about the
equivalence relations between many of these systems, but I don't see
that being the case in practice.