[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The poor state of documentation of pcase like things.
From: |
Richard Copley |
Subject: |
Re: The poor state of documentation of pcase like things. |
Date: |
Sat, 2 Jan 2016 01:15:31 +0000 |
On 1 January 2016 at 18:39, David Kastrup <address@hidden> wrote:
> John Wiegley <address@hidden> writes:
>
>>>>>>> Eli Zaretskii <address@hidden> writes:
>>
>>> (pcase skip
>>> (`nil nil)
>>> (`0 t)
>>> (_ (setq i (+ i skip -1)) (funcall get-next-frame)))))))
>>
>> (cond ((null skip))
>> ((eq skip 0) t)
>> (t (setq i (+ i skip -1))
>> (funcall get-next-frame)))
>>
>> Not much difference.
>
> If skip is nil, the first returns probably nil and the second t. One
> could probably do
>
> (and skip
> (or (eql skip 0)
> (setq ...)))
True, but only an unintentional slip. I think the charitable interpretation is
(cond
((null skip) nil)
[...])
> I'm not fond of eq for numeric comparisons: that's an Elispism.
That's Elisp programs for you. I'd have used zerop.
- Re: The poor state of documentation of pcase like things., (continued)
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Re: The poor state of documentation of pcase like things., David Kastrup, 2016/01/03
- Re: The poor state of documentation of pcase like things., Dmitry Gutov, 2016/01/03
- Re: The poor state of documentation of pcase like things., David Kastrup, 2016/01/03
- Re: The poor state of documentation of pcase like things., Dmitry Gutov, 2016/01/03
- Re: The poor state of documentation of pcase like things., David Kastrup, 2016/01/03
- Re: The poor state of documentation of pcase like things., Michael Heerdegen, 2016/01/03
- RE: The poor state of documentation of pcase like things., Drew Adams, 2016/01/04
- Re: The poor state of documentation of pcase like things., John Wiegley, 2016/01/04
- Re: The poor state of documentation of pcase like things., Eli Zaretskii, 2016/01/04
- Re: The poor state of documentation of pcase like things., Michael Heerdegen, 2016/01/03
- Re: The poor state of documentation of pcase like things.,
Richard Copley <=
- RE: The poor state of documentation of pcase like things., Drew Adams, 2016/01/01
RE: The poor state of documentation of pcase like things., Drew Adams, 2016/01/01