5 ms·
> I Miss: Generators Ruby has had the equivalent of Python generators for a very long time (it also has things called Generators, but they aren't exactly the s
by dragonwriter 6y ago
> I Miss: Generators
Ruby has had the equivalent of Python generators for a very long time (it also has things called Generators, but they aren't exactly the same thing though they occupying some of the same space.)
> And Ruby 3.0 comes with Fibers
Fibers were introduced in Ruby 1.9 more than a decade ago. And before that, Ruby had general-purpose continuations; Fibers were more tractable for alternative implementations, and easier to optimize, and covered the main use cases of continuations, though they are strictly less powerful an abstraction.