Subject: Re: JVM vs CLR
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 01 Feb 2009 05:01:02 -0600
Newsgroups: comp.lang.lisp
Message-ID: <nJCdnX8eS-JzHRjUnZ2dnUVZ_rrinZ2d@speakeasy.net>
<duane@franz.com> wrote:
+---------------
| rpw3@rpw3.org (Rob Warnock) wrote:
| > It is this sort of terminological confusion that makes me
| > really, *really* wish that RxRS had instead used the term
| > "proper tail call optimization", since the latter encompasses
| > both the general case and the specific case of "tail recursion".
| > (*sigh*)
| 
| Several years ago Will Clinger and I had the terminology discussion on
| this newsgroup and concluded that a better phrase than "proper tail
| recursion" would be "space efficient tail recursion".  It removes the
| incendiary term "proper" (implying that other forms of tail calls or
| recursion are improper), and instead of "optimization", which usually
| implies speed, the "space-efficient" term describes what Scheme is
| really after.
+---------------

And I strongly prefer "optimization" to "recursion", since "recursion"
carries a bunch of baggage about computability and "iteration versus
recursion" that gets in the way. It also suggests self-recursion *way*
too strongly. I'm more concerned about the case where the program has
to run "forever" [such as an operating system or a server daemon] and
the program is a huge state machine that eats input events and "tail calls"
the next state. Whatever you call it -- maybe just the acronym TCO,
I dunno -- it has to cover this case.

How about "proper tail call conversion" or "proper tail call elimination",
meaning that the "call" gets "properly" (safe-for-space, if that's your
favorite form of "proper") converted to a "jump" [and that the "return"
gets eliminated] and that any local environment (including incoming args)
gets abandoned?

+---------------
| Unfortunately, nobody seems to remember that conversation, since
| I've heard the term used very seldom after that. Perhaps if Will
| were to concede too use that term, he wouldn't get into arguments
| with non-lispers who have become confused by the term.
+---------------

I myself have no trouble with "proper", since I think that any TCO that
*isn't* safe-for-space *is* "improper"!  ;-}  And I really, really think
that "recursion" has to go [see reasons above]. Whereas "tail call" has to
stay, since that's the basic conceptual "hook". But I'm flexible; I could
stand to replace "proper" with "safe", but not "space-efficient" -- it's
both too long and "efficiency" has the same problem as "optimization",
it's not an absolute... but needs to be!! ["Safe" is sufficiently close
to an absolute, with "safe-for-space" assumed as one of the kinds of
"safety" that must be provided.]

So maybe "safe tail call conversion" or "safe tail call elimination"?


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607