Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "Re: Concerns about removal of continuations in Ruby 2.0"
>     on Tue, 31 Oct 2006 18:08:45 +0900, "Alder Green" <alder.green / gmail.com> writes:
> 
> |1. Certain control flow structures rely on continuations:
> |2. Existing 3rd-party packages rely on continuations:
> |3. Certain possible features and packages need continuations:
> 
> Yes, yet they are few.  What I said were:
> 
>   * Ruby 1.9.1 will not have continuation, since they have lowest
>     priority and are difficult to implement efficiently.
> 
>   * no promise (neither positive nor negative) on continuation for
>     1.9.2 or 2.0, for exact same reason above.

 From a JRuby perspective, we could support continuations, but with the 
same or greater limitations on their utility. With no continuation 
support at the VM level, we would need to avoid deepening the Java call 
stack to allow continuations to function. This isn't too terribly 
difficult to do for pure Ruby code, but quite difficult and a 
performance hit for Java code. It's also impossible to do with 
third-party libraries involved that aren't designed with microthreading 
or stackless execution in mond. There are tools that can microthread 
existing code after-the-fact, but that's purely experimental.

Of course I don't believe a language should be developed with platform 
limitations in mind, or I'd be using Groovy...but in this case the 
difficulty of implementing continuations efficiently, portably, and 
correctly with native threads and external libraries involved almost 
seems to outweigh their utility. But I'm not a language design maven, so 
I will not offer my opinion on whether continuations are a worthwhile 
feature. Suffice it to say I haven't seen any *practical* applications 
of continuations that couldn't be implemented in a less abstract (but 
possibly more verbose) way.

-- 
Charles Oliver Nutter, JRuby Core Developer
Blogging on Ruby and Java @ headius.blogspot.com
Help spec out Ruby today! @ www.headius.com/rubyspec
headius / headius.com -- charles.nutter / sun.com