[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace trivial pcase occurrences in the Emacs sources
From: |
Stefan Monnier |
Subject: |
Re: Replace trivial pcase occurrences in the Emacs sources |
Date: |
Tue, 30 Oct 2018 14:17:10 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Not everybody is familiar with dolist by any means. Is dolist's doc
> string of sufficiently high quality to act as this basis?
If dolist's docstring is not good enough, then I don't think it's
pcase-dolist's job to fix it.
>> We do have to keep the reference to `pcase` because we don't want to
>> repeat the definition of what a pcase pattern can look like.
>
> Yes, I think that's right.
>
> Things I believe MUST appear explicitly in the doc string for
> pcase-dolist:
> 1. It is a loop over the elements of LIST, which must be a list.
> 2. It attempts to match the current list element with the supplied
> PATTERN, which must be a valid pcase style pattern.
> 3. The BODY forms are evaluated for each element of the list.
> 4. The purpose of the matching is to create bindings for symbols, and
> these bindings are in force when the BODY forms are evaluated.
> 5. When a pattern match fails, ..... (This needs to be stated).
This is highly redundant w.r.t pcase-let and dolist. Fine for the
manual, but not for docstrings. You can click on the link to the
docstring of `dolist` and `pcase` (tho, I now see the link should go to
`pcase-let` instead).
Stefan
- Re: Replace trivial pcase occurrences in the Emacs sources, (continued)
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Clément Pit-Claudel, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Andy Moreton, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Clément Pit-Claudel, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources,
Stefan Monnier <=
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Andy Moreton, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Andy Moreton, 2018/10/29
- pcase-lambda usage [Was: Re: Replace trivial pcase occurrences in the Emacs sources], Garreau\, Alexandre, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Van L, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
Re: Replace trivial pcase occurrences in the Emacs sources, John Wiegley, 2018/10/23
Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/23