Article View: net.lang.lisp
Article #724Re: call/cc and proper tail recursion
From: Rob MacLachlan
Date: Sat, 01 Nov 1986 07:27
Date: Sat, 01 Nov 1986 07:27
16 lines
1348 bytes
1348 bytes
From: harrison@uicsrd.CSRD.UIUC.EDU
Newsgroups: net.lang.lisp
Subject: Re: call/cc and proper tail recursion
I agree that global analysis of the program is the answer; my point is that
the definition of scheme makes it seem as though one can state simply that
tail recursion can be made as efficient as iteration, which simply isn't so
in the presence of call/cc.
Proof notwithstanding, you are totally wrong. As was earlier mentioned by
someone who knew what they were talking about, "call with current
continuation" is implemented in a somewhat expensive way so that tail
recursion still does work. Basically what you do is copy the entire stack
onto the heap. Your time would be better spent if you avoided proving
impossible things which have already been done.
Technical Details
Message-ID:
<1087@spice.cs.cmu.edu>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!spice.cs.cmu.edu!ramReferences:
<20000003@uicsrd> <20000010@uicsrd>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!spice.cs.cmu.edu!ram From: ram@spice.cs.cmu.edu (Rob MacLachlan) Newsgroups: net.lang.lisp Subject: Re: call/cc and proper tail recursion Message-ID: <1087@spice.cs.cmu.edu> Date: Sat, 1-Nov-86 02:27:33 EST Article-I.D.: spice.1087 Posted: Sat Nov 1 02:27:33 1986 Date-Received: Mon, 3-Nov-86 22:40:39 EST References: <20000003@uicsrd> <20000010@uicsrd> Organization: Carnegie-Mellon University, CS/RI Lines: 16