emacs-devel
[Top][All Lists]
Advanced

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

Re: The poor state of documentation of pcase like things.


From: David Kastrup
Subject: Re: The poor state of documentation of pcase like things.
Date: Sat, 02 Jan 2016 09:35:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Daniel Colascione <address@hidden>
>> Date: Fri, 1 Jan 2016 11:05:31 -0800
>> Cc: Michael Heerdegen <address@hidden>, address@hidden

[pcase stuff]

>> > One could probably do
>> > 
>> > (and skip
>> >      (or (eql skip 0)
>> >          (setq ...)))
>> > 
>> > I'm not fond of eq for numeric comparisons: that's an Elispism.
>> 
>> That's true, but I think it's too pervasive to change now, so why
>> fight it?
>
> Who said anything about fighting?  I just asked if there was anything
> there that I was missing.

I am pretty sure Daniel was referring to my eq/eql side remark.
I certainly hope that "pervasive" is not a proper characterization of
pcase use yet though I haven't checked.

> Now that I know there isn't, I can convert such code to using 'cond'
> whenever I feel like it.  Like we do with whitespace changes.

Some of the quoted pcase examples indeed felt like the "if your
preferred tool is a hammer, every problem looks like a nail" phenomenon.

There certainly is a case for liberal use of complex complexity-taming
constructs (for example, overall I can appreciate how cl-loop
straightens out a lot of awkward loop constructs even though its syntax
is not really Elisp-like).  But when a simple construct is a perfect
fit, it's not helping understanding.

-- 
David Kastrup



reply via email to

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