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.
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