Re:The Lisp curse, now coming to your ecosystem
by Xirdus on Friday November 06, 2026 @11:45AM
(#50394770)
In other words, as of 2026, this phrase:
> if what you mean is, you haven't seen macros used in ways that make you wish your day-job programming language had macros, that's fixable.
is not true at all anymore? Or is it only true under very specific circumstances (if so, what are they)?
Re:The Lisp curse, now coming to your ecosystem
by brlewis on Friday November 06, 2026 @03:40PM
(#50398191)
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.
About back then, Perl/PHP/Python/Java/Ruby were never as good at pulling groups out of rows of SQL, but people could work around that by taking more time, writing more code, being more careful. So if you haven't seen macros used to make it better, you don't realize you're missing out on a huge deal. Maybe you just have a vague idea that things could be better, but you're too busy finding and fixing bugs to pursue this thought.