all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar.batsov@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	John Mastro <john.b.mastro@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: if-let and when-let: parallel or sequential
Date: Mon, 11 Aug 2014 15:01:26 +0300	[thread overview]
Message-ID: <etPan.53e8b096.4e6afb66.118e6@Bozhidars-MacBook-Pro.local> (raw)
In-Reply-To: <jwvwqagwesx.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 836 bytes --]

On August 10, 2014 at 6:23:25 PM, Stefan Monnier (monnier@iro.umontreal.ca) 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.  


Stefan  


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. 

[-- Attachment #2: Type: text/html, Size: 1547 bytes --]

  reply	other threads:[~2014-08-11 12:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-10  2:44 if-let and when-let: parallel or sequential John Mastro
2014-08-10 15:22 ` Stefan Monnier
2014-08-11 12:01   ` Bozhidar Batsov [this message]
2014-08-11 14:42     ` Stefan Monnier
2014-08-11 16:40       ` Harald Hanche-Olsen
2014-08-11 17:49       ` Bozhidar Batsov
2014-08-11 20:55         ` Harald Hanche-Olsen
2014-08-12  2:43       ` Lars Magne Ingebrigtsen
2014-08-12  3:15       ` Richard Stallman
2014-08-12  3:30         ` John Mastro
2014-08-12 14:32           ` Elias Mårtenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=etPan.53e8b096.4e6afb66.118e6@Bozhidars-MacBook-Pro.local \
    --to=bozhidar.batsov@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=john.b.mastro@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.