From: avi@...4.com (Avi Bryant) Date: 2004-03-11T04:19:41+09:00 Subject: Re: Why there is no Continuation.new ? gabriele renzi wrote in message news:<0fit40laostu79fvclc0sp0vb0179q47m2@4ax.com>... > Btw, I wonder what's wrong with a more rubyish way to use > continuations. > the sample from ri : > > arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ] > callcc{|$cc|} > puts(message = arr.shift) > $cc.call unless message =~ /Max/ > > To me this seem crying to become: > arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ] > cc= Continuation.new # optional &blk > puts(message = arr.shift) > cc.call unless message =~ /Max/ For what it's worth, in Smalltalk I use the equivalent of cc = Continuation.current and Continuation.current{|cc| ... } Avi