Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Technically, it is still a continuation, even if it does not match the behavior of Haskell's continuation monad.

http://c2.com/cgi/wiki?SingleUseContinuation



I didn't know that, thanks. Seems less useful though.

What's the correct term for a continuation as I understand them? (eg: as they are in Haskell, Ruby, Scheme etc)


Continuations that are not single use are usually called multi-shot continuations.

Single shot continuations are very useful though. They are enough for a very large percentage of the situations you would use continuations for while being much more efficient to implement (no need to save the stack)while also being more reasonable theretically in other situations(call/cc can be used to break some important invariants when it interacts with mutablestate and other things like that. Its kind of subtle)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: