Damus
Panicz Maciej Godek profile picture
Panicz Maciej Godek
@Panicz Maciej Godek
I've been a keen user of the "and-let* macro defined in the SRFI-2. I've even authored its sequel, SRFI-202.

But I never really liked the name.
I mean, it does reveal that conceptually it's an amalgam of "and" and "let*. But as a word to be used in a language, it's rather clumsy.

(In this regard it resembles "multiple-value-bind" from Common Lisp. OK, it does bind multiple values, but that's not a handy word. It's as if "progn" from Common Lisp was "evaluate-forms-in-order. I mean, "progn" is already a bad name compared to Scheme's "begin", but)

In either case, today I had a small revelation. I mean, I've been thinking about the right name for "and-let*" for many years, so moments like this don't happen very often.

So, ladies and gentlemen, who - like me - are disappointed with the name of the "and-let*" macro, even though you find the macro itself useful, let me present a better alternative:

given

You're welcome.
2
Kartik Agaram · 4w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpq4rvx632dlvqthkn3a7uacmcklf7peee89dg6hjkn9ntdlwxzg97qgwcdda Doesn't quite capture the conditional nature. Maybe when-given?
Vassil Nikolov | Васил Николов · 4w
I, for one, like it that "multiple-value-" is spelled out in full. This kind of naming convention has advantages. Myself, I am in a different kind of trouble, trying to remember which returns multiple values and which returns a list: `multiple-value-list' `values-list' By the way, given my ignoranc...