Y combinator and tail call optimizations
The definition of a Y combinator in F# is
How is one expected to use open sockets with [delimited] continuations?
I’m trying to figure out how an open socket or file handle should interact with continuations. Searching has revealed that dynamic-wind
is probably part of the solution, but I’m more interested in the methodology rather than the implementation, and all I could find is how to implement it under various conditions.
What is an example of a continuation not implemented as a procedure?
An interesting discussion about the distinction between callbacks and continuations over on SO has prompted this question. By definition, a continuation is an abstract representation of the logic needed to complete a computation. In most languages this manifests as a one argument procedure to which you pass whatever value needs continued processing.
What is an example of a continuation not implemented as a procedure?
An interesting discussion about the distinction between callbacks and continuations over on SO has prompted this question. By definition, a continuation is an abstract representation of the logic needed to complete a computation. In most languages this manifests as a one argument procedure to which you pass whatever value needs continued processing.
What is an example of a continuation not implemented as a procedure?
An interesting discussion about the distinction between callbacks and continuations over on SO has prompted this question. By definition, a continuation is an abstract representation of the logic needed to complete a computation. In most languages this manifests as a one argument procedure to which you pass whatever value needs continued processing.
What is an example of a continuation not implemented as a procedure?
An interesting discussion about the distinction between callbacks and continuations over on SO has prompted this question. By definition, a continuation is an abstract representation of the logic needed to complete a computation. In most languages this manifests as a one argument procedure to which you pass whatever value needs continued processing.
What is an example of a continuation not implemented as a procedure?
An interesting discussion about the distinction between callbacks and continuations over on SO has prompted this question. By definition, a continuation is an abstract representation of the logic needed to complete a computation. In most languages this manifests as a one argument procedure to which you pass whatever value needs continued processing.
What is an example of a continuation not implemented as a procedure?
An interesting discussion about the distinction between callbacks and continuations over on SO has prompted this question. By definition, a continuation is an abstract representation of the logic needed to complete a computation. In most languages this manifests as a one argument procedure to which you pass whatever value needs continued processing.
Are first-class continuations useful in modern object-oriented programming languages?
Continuations are extremely useful in functional programming languages (e.g. the Cont
monad in Haskell) because they allow a simple and regular notation for imperative-style code. They’re also useful in some older imperative languages because they can be used to implement missing language features (e.g. exceptions, coroutines, green threads). But for a modern object-oriented language with support built in for these features, what arguments would there be for also adding support for first-class continuations (whether the more modern delimited style reset
and shift
or scheme-like call-with-current-continuation
)?
Are first-class continuations useful in modern object-oriented programming languages?
Continuations are extremely useful in functional programming languages (e.g. the Cont
monad in Haskell) because they allow a simple and regular notation for imperative-style code. They’re also useful in some older imperative languages because they can be used to implement missing language features (e.g. exceptions, coroutines, green threads). But for a modern object-oriented language with support built in for these features, what arguments would there be for also adding support for first-class continuations (whether the more modern delimited style reset
and shift
or scheme-like call-with-current-continuation
)?