Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!wuarchive!uunet!zephyr.ens.tek.com!tektronix!sequent!mntgfx!plogan From: plogan@mentorg.com (Patrick Logan) Newsgroups: comp.lang.scheme Subject: Tail recursion Message-ID: <1991Feb18.152447.12073@mentorg.com> Date: 18 Feb 91 15:24:47 GMT Organization: engr Lines: 34 >Date: 15 Feb 91 17:20:42 GMT >From: david carlton > >In article harlan@copper.ucs.indiana.edu (Pete Harlan) writes: > Certainly a compiler for any language may perform tail-call > optimization, and in this respect it is a language-independent issue. > > However, when a *language*, rather than a compiler, guarantees an > optimization, it opens the door for a programming style that might not > be a portable program in the language if the optimization were not > guaranteed. > >really? the scheme semantics doesn't mention tail recursion anywhere >that i can tell, which would seem to imply that optimizing it out >doesn't change the actual meaning of a program. Not implementing proper tail recursion does not change the semantics of a program. But some programs that will run in an implementation with proper tail recursion may not run in one without it. This is especially a problem since it is common to implement loop control structures using procedure calls. I don't have the final IEEE standard, so I won't risk of mentioning anything about requirements. > >david carlton >carlton@husc9.harvard.edu > -- Patrick Logan, uunet!mntgfx!patrick_logan -or- patrick_logan@mentorg.com Mentor Graphics Corp. 8500 SW Creekside, Beaverton, Oregon 97005-7191 => Note that I have a new email address listed above!