User loginNavigation |
Strongly Typed Coroutines (minor question)I'm considering "asymmetric full coroutines" and their operators as defined in this before LTU described paper Revisiting Coroutines. At least recent versions of Racket support these style of coroutines I'm told (documentation lags), but in a latently typed language. In this model, a coroutine supports operators:
Furthermore, when the coroutine function exits "normally", it is then "dead". Thus coroutines are as much, or more, "pipes", with values "s" fed by Just as important, as a "stackful" construct, the Thus, my inquiry is how to type the One possibility is to wrap the coroutine in some kind of parametric class type:
The coroutine object might be passed down the call chain eventually to any routine wishing to
This seems quite burdensome, requiring design of routines explicitly for coroutine use. An attraction of coroutines is a flexible, more-or-less ad hoc inversion of control mechanism. Another, more complicated option, is to percolate This latter method only affects routines that are known to call A second question is how to distinguish values returned via Or is some potentially more memory efficient, if stylized, mechanism typically employed? FWIW, the use of exception handling language facilities for this kind of "out of band" control flow offends my sensibilities. Dynamic control via continuations, CL's lexical Yes, a rather narrow pair of question for LTU, but I hope it will interest some folks here, and as always, any and all help greatly appreciated. - Scott By scottmcl at 2011-02-09 03:33 | LtU Forum | previous forum topic | next forum topic | other blogs | 5480 reads
|
Browse archives
Active forum topics |
Recent comments
27 weeks 2 days ago
27 weeks 2 days ago
27 weeks 2 days ago
49 weeks 3 days ago
1 year 1 week ago
1 year 3 weeks ago
1 year 3 weeks ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 10 weeks ago