Ok, I've decided that along with tail calls and indy, the next thing on my list is delimited continuations.
Ruby 1.9 has started to make heavier use of "fibers", which are basically just coroutines or generators. Not only can you use them directly, a la fiber = Fiber.new, you can also get generator behavior out of any method on Enumerable. So instead of writing: foo.each {|a| p a} you can do enum = foo.each p enum.next p enum.next ... This is implemented in CRuby by using coroutines and stack-saving techniques. On the JVM, if we can't reduce the enumeration to a simple case (like known core classes), or if the iteration is arbitrarily complex (as it could be for a user-defined enumerable type), our only option is to use a thread. And that will be pretty heavy if people are doing a lot of enumeration. So I need to ask: What's the status of the continuation patch? Who else has interest in it? Would delimited continuations reduce security concerns? - Charlie _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev