Xref: utzoo comp.object:579 comp.lang.c++:5799 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!sun!brahmand!grover From: grover%brahmand@Sun.COM (Vinod Grover) Newsgroups: comp.object,comp.lang.c++ Subject: Re: Continuations Message-ID: <128758@sun.Eng.Sun.COM> Date: 4 Dec 89 22:34:49 GMT References: <1989Nov30.002204.4899@mentor.com> Sender: news@sun.Eng.Sun.COM Reply-To: grover@sun.UUCP (Vinod Grover) Organization: Sun Microsystems, Mountain View Lines: 18 In article <1989Nov30.002204.4899@mentor.com> plogan@mentor.com (Patrick Logan) writes: > > >>From: grover%brahmand@Sun.COM (Vinod Grover) > > Admittedly, this is not as elegant as > >Scheme's notion of continuation but workable in concept. > > >To be more accurate, longjump is not workable in concept because a >longjump can only be executed once per setjmp. A continuation in >Scheme can be captured once and executed zero or more times. Things >become more complicated when you start considering nested setjmps >and longjumps. Yes, you are quite right. In fact the problem is even deeper than that, as I just learned, if the function calling setjmp returns before the call to longjmp is made then the longjmp is made to a non-existent environment. Thanks for correcting me. Vinod Grover Sun Microsystems.