On Sun, Apr 08, 2012 at 12:33:55PM +0200, Tamas K Papp wrote:
I usually ... implement this pattern using the ANAPHORA library. Your macro would of course be a better solution if, for some reason, one doesn't want to use an anaphoric macro
Yeah, that's the idea. As with all the other macros in bindings.lisp, it's just a cleaner version of the same functionalith ANAPHORA provides. I took the presence of when-let and if-let to imply that this was established as a reasonable thing for alexandria to do.
but IMO it would be cleaner to...
I agree that the multiple binding use-case is a bit weak, but opted to support it for the sake of consistency with the other *-let macros already in alexandria. Returning them as multiple values is an interesting way to develop that into something more useful. I'm not sure I can see that being taken advantage of often, but it doesn't detract from the common use case, so I see no reason not to support it.