Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.lang.scheme Subject: Re: Tail-calling and garbage collection Message-ID: Date: 18 Feb 91 16:23:05 GMT References: <9102112032.AA03542@cymbal.reasoning.com.> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 32 Nntp-Posting-Host: teachb In-reply-to: hanche@imf.unit.no's message of 16 Feb 91 23:24:34 GMT On 16 Feb 91 23:24:34 GMT, hanche@imf.unit.no (Harald Hanche-Olsen) said: hanche> In article carlton@husc10.harvard.edu (david carlton) writes: carlton> really? the scheme semantics doesn't mention tail recursion carlton> anywhere that i can tell, which would seem to imply that carlton> optimizing it out doesn't change the actual meaning of a carlton> program. Actually the english text (as opposed to the denotational semantics) of the 3.99 scheme report mandates tail recursion in the implementation wherever possible. The denotational semantics are only *part* of the scheme report. Clearly tail recursion does not make a difference in the world of mathematics, but scheme is not lambda calculus; the report defines the behaviour of conforming scheme *language implementations*, to the point of prescribing specific syntax and giving various levels of conformance. The scheme report is essentially the specification of scheme's 'eval' function (which is never explicitly mentioned :->), and some "quality of implementation" requirements *are* indeed explicitly made. hanche> I'd say that whether or not the program runs out of memory hanche> changes its meaning, whether the semantics say so or not ... Well said! However, more than its meaning, it changes its behaviour, and here we are skating on very thin ice. The semantics of "bottom" and of partial functions are not that easy to agree about :-). -- Piercarlo Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk