emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: cond* vs pcase


From: Drew Adams
Subject: RE: [External] : Re: cond* vs pcase
Date: Tue, 6 Feb 2024 16:35:19 +0000

>> Being able to do equal instead of eql is also 
>> something that speaks in favour of pcase...
> 
> It speaks more in favor of having CASE where
> you can change the comparison operator...,
> not something much more generic pcase (or
> even cond*!) -- i.e. why use pcase/cond* when
> you're not using any of the features that are
> the main point of those two macros.

Bingo.  Just because `cl-case' is limited to
symbols and `eql', and just because Emacs has
relegated it to `cl-' instead of having its
own `case' for such things, is not a reason
to use `pcase' for such simple cases (trivial
"patterns").

`pcase' mixes powerful pattern-matching with
complex destructuring (binding).  It's truly
overkill for trivial case-testing.
___

When you think that all you have in your tool
box is The Quantum Electronic Super Jackhammer,
you dress everything up as a fancy nail that
it can recognize and handle.  Lipstick really
not needed.  Not a code-obfuscation contest.



reply via email to

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