eleanor at goth-chic.org
Thu Mar 15 13:30:37 PDT 2007
On 15 Mar 2007, at 16:52, Piers Cawley wrote:
> Eleanor <eleanor at goth-chic.org> writes:
> I seem to recall that continuations and coroutines are equivalent; you
> can implement one in terms of the other.
I think co-routines are easier for non-CS people to grasp, but that
could just be my personal bias ;)
>> I know many of these things can be done in Ruby, but there's nothing
>> quite as pleasant as having the details taken care of by the language
>> itself :)
> I think the issue is that Ruby's syntax isn't particularly
> malleable. So you can implement (say) a lazy list generator, but you
> then can't rejig the parser to let you hide the scaffolding.
Indeed. A good OO abstraction and some funky meta-programming tricks
would probably do the job, but it's never going to be as pretty as
having a suspend keyword.
Games With Brains
raise ArgumentError unless @reality.responds_to? :reason
More information about the Chat