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 22:09:11 +0300

> Cc: address@hidden
> From: Clément Pit-Claudel <address@hidden>
> Date: Wed, 24 Oct 2018 15:00:46 -0400
> 
> For large collections, I imagine you would use a hashtable?

I doubt that you will see in practice collections that are so long
that assoc is too slow.

> > 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.
> 
> Of course. Note that I mentioned reading the pcase forms, not writing them. 
> I'm just pointing out that there are readers who find pcase more readable 
> than either assoc or cond with eq tests.

I think the complicated quoting (frequently used incorrectly) of pcase
makes it harder to read for at least some, if nothing else, because
they need to waste time trying to understand what is the reason for
using those quotes.  I know it happened to me.



reply via email to

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