[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace trivial pcase occurrences in the Emacs sources
From: |
Eli Zaretskii |
Subject: |
Re: Replace trivial pcase occurrences in the Emacs sources |
Date: |
Wed, 24 Oct 2018 20:35:08 +0300 |
> From: Michael Heerdegen <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Wed, 24 Oct 2018 17:48:50 +0200
>
> Eli Zaretskii <address@hidden> writes:
>
> > I agree with the "trivial" part, but why cl-case and not cond (with
> > the same "trivial" caveat)?
>
> Just because `cl-case' fits better? - for an equivalent rewrite using
> `cond', I need to define an extra local variable to bind the treated
> value to, event a name for it (we speak about ~ 300 cases!) and all cond
> branches would look equally like (eq VAR 'VAL). Not an improvement in
> readability in my mind.
I guess we will have to disagree about that. At the very least, you
require people to be acquainted with cl-case well enough.
And if repeating (eq foo 'bar) is the issue, you can use assoc and a
data structure, see my other message. Just a thought.
- Re: Replace trivial pcase occurrences in the Emacs sources, (continued)
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/23
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/23
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/23
- pcase vs. case (where it could also be used) [Was: Re: Replace trivial pcase occurrences in the Emacs sources], Garreau\, Alexandre, 2018/10/23
- Re: pcase vs. case (where it could also be used) [Was: Re: Replace trivial pcase occurrences in the Emacs sources], Stefan Monnier, 2018/10/23
- Re: pcase vs. case (where it could also be used) [Was: Re: Replace trivial pcase occurrences in the Emacs sources], Garreau\, Alexandre, 2018/10/23
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources,
Eli Zaretskii <=
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/27
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/27
- Re: Replace trivial pcase occurrences in the Emacs sources, Dmitry Gutov, 2018/10/27
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/27
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/27
- pcase ` meaning [Was: Re: Replace trivial pcase occurrences in the Emacs sources], Garreau\, Alexandre, 2018/10/27
- How other pattern-matching lisps do [Was: Re: pcase ` meaning [Was: Re: Replace trivial pcase occurrences in the Emacs sources]], Garreau\, Alexandre, 2018/10/28