Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: (Perl6) Groking Continuations

by shotgunefx (Parson)
on Apr 08, 2003 at 19:50 UTC ( [id://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."

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://249058]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-19 17:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found