Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!uwm.edu!cs.utexas.edu!sun-barr!newstop!texsun!pollux!ti-csl!m2!gateley From: gateley@m2.csc.ti.com (John Gateley) Newsgroups: comp.object Subject: Re: Continuations Message-ID: <101846@ti-csl.csc.ti.com> Date: 11 Dec 89 23:27:32 GMT References: <1989Nov30.002204.4899@mentor.com> <6527@pbhyf.PacBell.COM> Sender: news@ti-csl.csc.ti.com Reply-To: gateley@m2.UUCP (John Gateley) Organization: TI Computer Science Center, Dallas Lines: 24 In article <6527@pbhyf.PacBell.COM> jste@PacBell.COM (Joshua Stein) writes: >Can someone post a non-implementation dependent definition of continuations; >what they are, what they do, and how they fit into the object-oriented paradigm. A continuation of some point during the execution of a program is a function which accepts any results at the point, and returns the result of the rest of the program. To be more technical, you need to define points occuring during execution and so on. Basically continuations are a different flavor of goto. They can do forward jumping (called escape continuations) where you want to punt and jump out of 20 levels of function calls at once. They can do backwards jumping where you invoke the continuation after you passed the point in the program which created it (causing looping). They are used to model different control constructs. Coroutines are the canonical example; it is very easy to model coroutines given continuations. They are extremely powerful, and consequently extremely dangerous, and also tend to be as controversial as gotos. I don't know how they fit in an object oriented paradigm. John gateley@m2.csc.ti.com