emacs-devel
[Top][All Lists]
Advanced

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

Re: Sweeter Emacs Lisp


From: Thien-Thi Nguyen
Subject: Re: Sweeter Emacs Lisp
Date: Mon, 22 Jul 2013 18:33:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

() Stefan Monnier <address@hidden>
() Mon, 22 Jul 2013 11:24:13 -0400

   So maybe a when-let makes sense, tho I'd prefer a when-let*
   (which has also been seen under the name let-and, IIRC).

Are you willing to consider Scheme's ‘and-let*’ (SRFI 2).

IIRC i also proposed, maybe a year back, a Schemish ‘cond’
(with ‘=>’) but it was rejected.  RMS suggested instead:

 (cond VAR (CONDITION [BODY...])
           ...)

which would bind VAR to the (non-nil) value of CONDITION
such that BODY can refer to it, equivalent to:

 (let (VAR)
   (cond ((setq VAR CONDITION) [BODY...])
         ...))

I like this; it strikes me as more Lispy.  Unfortunately, i don't
remember if this "cond w/ VAR" went anywhere (so probably it didn't).

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

Attachment: pgp_FoQcb_vdi.pgp
Description: PGP signature


reply via email to

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