I just wonder what has become of the coroutine feature.
Was that dropped from the spec? And when yes, why?
The trick is to design the yield statement nicely.
And also to define a syntax that allows to get a fresh
instance from a coro quasi-class.

  sub foo () { my $x = 0; yield $x++; }

  &f = &foo.new; # or also foo.new?

  say f(); # 0
  say f(); # 1
  say f(); # 2

Regards, TSa.

"The unavoidable price of reliability is simplicity"
  -- C.A.R. Hoare

Reply via email to