3 ms·
One of the things I realized from having support for lazy evaluation in Ruby's Enumerable is that while it's great on a very few occasions, as you say most of t
by vidarh 3y ago
One of the things I realized from having support for lazy evaluation in Ruby's Enumerable is that while it's great on a very few occasions, as you say most of the time I want eager evaluation, and even most of the times where I don't care for any specific expression, it ends up being forced so close by anyway that it is in practice little different.
It changes how you think in a few very specific cases, but even a lot of situations where e.g. infinite series are helpful, expressing iterations over blocks that can terminate the iteration itself early removes any need for laziness.