emacs-devel
[Top][All Lists]
Advanced

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

Re: Code for cond*


From: Stefan Monnier
Subject: Re: Code for cond*
Date: Thu, 25 Jan 2024 11:05:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>    (cond-let
>      (:let var-for-rest value)
>
> Is there a reason why using a keyword here?

It was to "ensure" compatibility with existing `cond` code.

Also it was based on the premise that most `cond`s would *not* use it
since such code is mostly needed to replace things like:

    (let (val)
      (cond
       [...]
       ((foo (setq var (bar)))
        [...])
       [...]))
    
And while such code does occur, it occurs only in a minority of `cond`
uses, so I thought it would be worthwhile for it to "stand out" so as
not to catch the reader by surprise.


        Stefan




reply via email to

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