|
|
|
|
|
by kazinator
394 days ago
|
|
I don't believe this is correct. Blocks are closures. Continuations were introduced in Ruby 1.8, via a callcc method in a Kernel module or something like that. Since 1.9 they are in some sort of deprecated status. I don't think that even the yield() stuff is implemented using continuations. |
|
I’m also sure you’re right that they’re not implemented using continuations. However, my understanding is that Ruby was originally conceived as a language with continuations. I’ll see if I can find a reference for that. But from what I recall reading in a blog post from someone who was at a programming language conference in 1997 when Matz introduced the language that’s how he described it.