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

Re: tail recursion (LONG)

My feeling is that a language which does not support both tail-recursion and
call/cc is not a true Scheme. I have used two such non-Scheme languages for
several years and have not found them to be unuseable, but I constantly had to
remind myself that they are not full Scheme implementations.

One of them is Jonathan Rees' PseudoScheme. The other is TI's Almost Scheme.
Both are packages built on top of Common Lisp. (In fact, TI's Almost Scheme
borrows code from Rees' PseudoScheme). Both are very nice to use, BUT...

I think it is important for people using such variant implementations to be very
aware of the limitations of their implementations. I therefore resist allowing
such implementations to claim to be full ``Scheme'' implementations.  I would
not object to a section in the standard/report which says that such
implementations may exist but must not purport to be a full Scheme implementa-
tion. They should instead include some sort of qualifier in their name... like
Pseudo, Quasi, or Almost. To do otherwise is to bring up the issue of portabil-
ity of *real* Scheme code with respect to these deficient implementations.

Maybe a less judgemental phrasing like ``this is a Scheme Level 0 implementation
in that it does not have tail-recursion or call/cc''; ``this is a Scheme Level 1
implementation in that it does not have tail-recursion'' etc. would be less
offensive than PSeudo and the like.

Specific to the issue of tail-recursion: if I create a large software system as
a meta-circular interpreter then it had better not crash simply because the
deficient Scheme I am running it on does not have tail recursion. I do not want
users of my program to think that I am an idiot for writing a system that will
crash after being run for only a few hours; I want them instead to understand
that their code crashes because of a limitation of their langauage
implementation. Forcing the Scheme vendor who sold them (or gave them) their
Scheme to include a qualifier would protect my reputation and appease my ego.

I just don't want people flaming at me because my code won't load or run right
on their less-than-Scheme language. It shouldn't be my problem: it is theirs and
I don't want to hear them complain to me about it. I especially don't want them
to use my code expecting it to work if they have a weak Scheme. Otherwise, I
would have just written the trash in Common Lisp and have had done with it.  To
make *me* provide a disclaimer like ``This code runs only on *full* Scheme
implementations: i.e., ones with tail-recursion and full call/cc'' is to rewrite
history by redefining the word ``Scheme'' in an Orwellian way. In my mind this
is analogous to saying: I have an ML which doesn't implement type inference, or
I have a FORTRAN that doesn't support IEE floating point numbers, or I have a
Haskell which isn't lazy, or I have a LISP that has no CONS.

Please stop trying to require Scheme to be Common Lisp compatible. Instead,
phrase your proposals in terms of ``Let's allow Level 0 implementations to be
deficient in the following ways...'' I get defensive when you try to desecrate
my religious icons.

I didn't intend to flame on like that. I won't push this point any further.
Maybe I'll just move to a Common Lisp mailing list and assault it with proposals
that they admit variants with only one namespace or that they mandate