Talk:Continuation

message: A continuation is a function (that takes an argument) used to explicitly model control flow. You can also observe that in various other articles such as those on continuation-passing style. Because continuations often (call-cc/delimited) can capture a program state the author now seems to inadvertently believe that that is the defining feature of a continuation,  it isn't,  it's about explicitly modelling control flow not capturing program state.  — Preceding unsigned comment added by 2A02:A467:CCD6:1:940D:DBF8:92F5:3D86 (talk) 19:44, 23 February 2022 (UTC)
thread_title:  Disagree with current definition of continuations 

message: I've added the scheme example from Tim Peters's linked posting. This article (an continuations in general) didn't make any sense until I read a concrete example. —The preceding unsigned comment was added by 14:38, 10 July 2006 (talk • contribs) Gene Thomas.
: An example in a widely-used language would be even better! 87.187.54.239 11:15, 13 March 2007 (UTC)
replies: text:  Isn't Scheme the most widely used language with standard first-class continuations? Perhaps Ruby has them now and is more widely known than Scheme, but I'm not convinced a Ruby example would be any better than the Scheme example. --Malirath (talk) 20:28, 6 December 2007 (UTC)
thread_title: Example

message: I don't think the initial examples should be in Scheme. I don't think this is the best for understanding for the vast majority of programmers. I myself program for a living, and I totally balked at the Scheme intro, not grasping one single thing of what it tries to explain (The same goes for Closure (computer science), using Lisp). If one look at Coroutines, this starts off with some nice pseudocode, immediately understandable for anyone having the slightest interest in computer languages, adaptable to one's preferred universe.  —Preceding unsigned comment added by 84.208.115.107 (talk • contribs) 
:I fully disagree with that. As a self-taught, working programmer who started with C, if you want to understand these sorts of topics (which you should), you need to do your homework & learn the vernaculars. (Or...er...the opposite of the vernacular, I suppose.) While there may not be a lingua franca of computer science, Scheme is one of those languages that is close. --Malirath 21:00, 11 September 2006 (UTC)
replies: text:  Hear, hear.  --Piet Delport 22:30, 11 September 2006 (UTC)
replies: text:  It also strikes me that pseudocode means that nobody except the author can be certain what it means. Sticking to R*RS Scheme, however, ensures that an example is as clear as it can be. Nigh anyone who can read Wikipedia can read the standard. --Malirath 02:35, 18 September 2006 (UTC)
thread_title:  Don't start with Scheme!! 

message: There is an article on Fiber (computer science).  Fibers appear to be very similar to continuations.  If they are the same, perhaps the articles should be merged.  If they are not the same, then perhaps a reference and some distinctions should be added to the article. Kevin99 18:04, 21 February 2007 (UTC)
replies: text: Close;  as the article points out, Fibers are essentially coroutines.  Any discussion and comparison probably belongs there.  --Piet Delport 08:03, 29 April 2007 (UTC)
thread_title:  Similar to fiber? 

message: Does anyone have a reference for the statement in the article that Steve Russell implemented continuations in his second Lisp interpreter?  Kleg 20:01, 31 July 2007 (UTC)
thread_title:  Steve Russel's second Lisp interpreter 

message: The section states that there's no consensus yet, however, after looking at the linked argument against, it's pretty clear that the opposition to continuations is a result of a fairly gross misunderstanding of the nature and working of continuations, the argument being, roughly, "let's not bother with continuations, instead let's devise a mechanism which would let us store enough of the state to resume the computation at any point", which is exactly what continuations are. The first linked blog post even goes as far as citing the fact that continuations can supposedly break if the user submits a form multiple times, showing utter confusion and completely missing the fact that preventing that is the very reason continuations are used for web programming. 
Given that both the pros and cons arguments linked are fairly insubstantial (just random blogs), I'd propose either either expanding that section into a proper explanation of exact nature of continuations as applied to the web programming, or entirely removing the mention of supposed lack of consensus, as it lacks any serious backup in well-researched publications. mathrick 22:48, 2 October 2007 (UTC)
replies: text: I for one "invented" a form of continuations in this context in my first web project (at school, in previous century) by using a "hidden=" field in forms sent back to the client to encode "what to do next" and avoid a heavy-weight session controller. I was quite aware of what I was doing though. Reading this, I was curious if anybody published something like that so we can use it in here without writing my WP:OR. In Queinnec's paper, there is a mention of that in the related work section (section 8). I think that some technical details would not hurt in this article, or be too off-topic. That section devotes too much space to this so called controversy, instead of being informative on how continuations may be implemented in a web app. Pcap ping 13:53, 5 September 2009 (UTC)
thread_title:  Continuations in web programming 

message: Though Dan Friedman is certainly a fan of call/cc,  and talks about continuations often,  and several chapters of the Essentials of Programming Languages are dedicated to the Continuation Passing Style,  he didn't come up with it.   Sussman and Steele's original Scheme, as detailed in the lambda papers, had an operator comparable to call/cc.   Even so, they didn't come up with it either,  exactly,  though their Rabbit compiler was the first to convert programs to the continuation passing style as part of the compiliation.   This site suggests that Landin may have come up with it,  though the site's author is not sure.    
The concept of a contination,  as opposed to operators such as call/cc that allow one to grab a continuation,   has an obscure origin in the early days of computing.  I don't really know many details here.  66.170.46.244 (talk) 12:55, 29 June 2008 (UTC)
replies: text: Please read Carl Hewitt's "Kinds of continuations" comment up above. He addresses some of the early history.  linas (talk) 15:25, 22 August 2009 (UTC)
thread_title:  Who invented call-with-current-continuation? 

message: Wow, that's a heavy article. I'm a computer scientist and I had a hard time grasping the summary. 81.15.57.130 (talk) 09:48, 11 September 2008 (UTC)
replies: text: I concur, this page should be simplified and have examples in pseudocode, so everyone can understand them. Antony Carthy (talk) 09:57, 2 October 2009 (UTC)
replies: text: I've added the example below. It's a shame it's sitting here in the talk page when it could be illustrating a practical usage in the article. Diego (talk) 10:38, 2 October 2009 (UTC)

text: Would it possible to have a step by step example of call/cc?  I interpreted call/cc g as g trap0.  The trap0 argument was propagated down through the function.  When the trap0 argument (which is a one parameter function itself) was executed with an argument, it would return to the create point of trap0.  So when trap0 3 was called, then the program would jump to call/cc g with the value 3. DetriusXii (talk) 18:09, 30 November 2011 (UTC)
thread_title:  Too complex 

message: Another classic example of the usefulness of continuations is the implementation of exception handlers (throw, catch).  I think this would be an excellent addition to this article: so, for example, both Java and C++ implement exceptions, but they do it in a hacky, non-general kind of way.  By contrast, it should become very simple if instead one had general-purpose continuations.  linas (talk) 17:11, 23 August 2009 (UTC)
thread_title:  Another example: Exceptions (throw, catch) 

message: This article says "In any language which supports closures, it is possible to write programs in continuation passing style and manually implement call/cc."
Well, Lua supports closures, so can anyone give an example on how to implement call/cc in Lua?
I'm not talking about Lua's coroutine table. I already know that exists, plus that's for coroutines, which if I understand correctly, can also be implemented using call/cc but they themselves are not call/cc.  Nothingist (talk) 12:52, 12 May 2010 (UTC)
replies: text: In other words, if that excerpt is really true then it would be appropriate to exemplify it, and I think Lua would be a perfect candidate to write an example in since it does have closures but no native call/cc functionality (again, I'm not talking about the coroutine table in Lua).  Nothingist (talk) 14:12, 13 May 2010 (UTC)
thread_title:  Continuations in Lua? 

message: A continuation reifies the program control state, i.e. the continuation is a data structure that represents the computational process at a given point in the process's execution; the created data structure can be accessed by the programming language, instead of being hidden in the runtime environment.
I wouldn't exactly call this a welcome matt. — MaxEnt 15:00, 3 August 2017 (UTC)
thread_title:  "Reifies", i.e., semicolon, afterthought 

message: Hello fellow Wikipedians,
I have just modified 2 external links on Continuation. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added tag to https://quachquynh.com/wp-content/uploads/2023/05/continuations.pdf
*Added archive https://archive.is/20130416024741/http://www.talesframework.org/ to http://www.talesframework.org/
*Added archive https://web.archive.org/web/20060501194520/http://www.brics.dk/~cw97/ to http://www.brics.dk/~cw97/
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
Cheers.—InternetArchiveBot (Report bug) 16:13, 12 August 2017 (UTC)
thread_title:  External links modified 

message: I found that MoarVM (Perl 6) has Single-shot continuations (https://www.moarvm.org/features.html). And later I found paper "Representing Control in the Presence ofOne-Shot Continuations" (https://www.cs.indiana.edu/~dyb/pubs/call1cc.pdf). It is too heavy for me so I would appreciate some extension of the article if it make sense. Or at least could be MoarVM (Perl 6) added to the list? Thank you. --mj41 (talk) 09:40, 2 August 2019 (UTC)
thread_title:  Single-shot continuations