Re:Callbacks as our Generation's Goto Statement
by anonymoushn on Thursday August 15, 2013 @07:10PM
(#6221176)
Supporting call/cc and dynamic-wind has a significant performance impact in some languages, even for code that does not use the features.
Supporting coroutine.create+coroutine.clone, shift+reset, or setcontext+getcontext+makecontext+swapcontext seems to have no performance impact on code that does not use the features.
OTOH, I think that the big problem with continuations is that it gets very difficult to build efficient implementations of them (and this tends to impact not just efficiency of code that uses continuation, but usually efficiency of any code in a language which supports them), and it is much more efficient to implement specialized weaker (but good enough for most key use cases) forms of the most important applications of continuations.