Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: (Perl6) Groking Continuations

by shotgunefx (Parson)
on Apr 08, 2003 at 19:50 UTC ( #249058=note: print w/ replies, xml ) Need Help??


in reply to (Perl6) Groking Continuations

One explaination that I found helpufl was from Paul Graham

"In implementors' terms, a continuation is basically a program counter and a copy of the stack. You can invoke it like a function, and you're back where you were when the continuation was made. So you can return multiple times out the same code.

It's not bad form to use the same continuation more than once. That happens when you use continuations to do nondeterministic search, for example.

Another thing continuations are useful for is server-based apps, strangely enough. We used them extensively in Viaweb to fake subroutine-like behavior, though because we were using CL rather than Scheme we used fake continuations made out of closures."


-Lee

"To be civilized is to deny one's nature."


Comment on Re: (Perl6) Groking Continuations
Re: Re: (Perl6) Groking Continuations
by stefp (Vicar) on Apr 09, 2003 at 15:27 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://249058]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2014-09-16 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (53 votes), past polls