emacs-devel
[Top][All Lists]
Advanced

[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 19:00:25 +0300

> From: Clément Pit-Claudel <address@hidden>
> Date: Wed, 24 Oct 2018 11:47:03 -0400
> 
> On 24/10/2018 11.03, Eli Zaretskii wrote:
> > Is it because people are too lazy to write (eq a b) as part of 'cond'?
> > Or is there something else I'm missing?  
> I think some of us (me, at least), just like the forms you posted better :)

Which forms? with or without the mistakes? ;-)

> The repetition of "eq" in each "cond" branch just looks redundant to me

If that's what bugs you, then how about

  (setq foo (assoc bar '((1 . one) (2 . two) ...)))

?

> and I have no trouble reading the pcase forms.

Please don't forget those who will read your code.  A code is written
once, but read many times.  It should be readable and
self-explanatory.



reply via email to

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