Re:I'm Betting on Call-by-Push-Value
by vidarh on Sunday March 10, 2024 @10:52AM
(#39659623)
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.
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.