← Back to context

Comment by brlewis

21 days ago

True if you would like syntax that doesn't lend itself to eager evaluation. In the `sql-repeat` example, `group-beginning?` takes an expression that can't be eagerly evaluated. It's evaluated twice, once for the current row and once for the previous row, and the result of evaluation is compared. It can't just be eagerly evaluated for the current row and the result used.

Also true if you want a shorthand syntax for defining a variable where the name of the variable is meaningful. JavaScript takes care of the most common case with destructuring assignment, but with macros you could make such syntax yourself.