Hacker News new | ask | show | jobs
by conradludgate 244 days ago
> You might wonder: “Won’t the block execute immediately when passed as an argument?” Here’s the key insight: in Rye, code blocks { ... } are values. They don’t evaluate until you explicitly tell them to.
1 comments

You're correct, that is lazy evaluation. The entire article talks about lazy evaluation without mentioning it, which was my point
I've been programming in REBOL for decade(s) so this is just how it worked and made sense and we never used term "lazy evaluation", so it not part of my vocabulary when explaining this.

Blocks are not evaluated by default, but they are eagerly evaluated if the function that accepts it decides to do so (if, do, loop) ... I understand lazy evaluation more like something that is meant to be evaluated, but physically only gets evaluated when or if you do need the result, which I'm not sure is entirely the same.

Lazy evaluation typically is a language-wide calling convention choice right? With that in mind I'm guessing the first-class block aspect of Rye might make it feel too loaded of a term to use to the author, because Rye's blocks-as-values are more flexible than just that. But maybe one mention of "this is kind of like lazy evaluation" would help.