[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: if-let and when-let: parallel or sequential

From: Bozhidar Batsov
Subject: Re: if-let and when-let: parallel or sequential
Date: Mon, 11 Aug 2014 15:01:26 +0300

On August 10, 2014 at 6:23:25 PM, Stefan Monnier (address@hidden) wrote:
> I noticed that the new `if-let' and `when-let' in trunk's subr-x create
> their bindings sequentially (like `let*' rather than `let'). Would there
> be any interest in renaming these to `if-let*' and `when-let*', and
> adding parallel-binding versions under the current names?

I have a hard time imagining a situation where the "parallel" version
would be useful.


if-let and when-let don’t make much sense with more than one binding form. Other lisps (like Clojure) would raise
an exception if you try to bind more than a single form.

;; good
(if-let ((x (something)))

;; error
(if-let ((x (something))
           (y (something-else)))

I’d suggest we do the same. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]