Brent 'Dax' Royal-Gordon wrote:

David Storrs wrote:

Well, at least that's a nice simple explanation.  Why couldn't anyone
have explained it to me that way before?  Unfortunately, it means that
continuations are a lot less useful than I thought they were.  :<


Actually, I think you're underestimating the little guys. After all, if they rolled back *all* of your changes, all they could do was repeatedly execute the same code!

Hmm... Could someone please give a few prototypical cases where continuations really shine over other methods of structure?

A guess from my current understanding:

You're wanting to play with a database. You take a continuation. You see if have a database handle open and good to go, if so you do your thing. (can you then dismiss the continuation? do uninvoked continuations pile up somewhere?). If the handle is not ready, you do everything needed to prepare the handle, and then invoke the continuation.
But I don't see how a continuation gained you much over C<prepare($dbh) unless ready($dbh);>.



So what makes them so cool?

-- Rod

Reply via email to