[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace trivial pcase occurrences in the Emacs sources
From: |
Andy Moreton |
Subject: |
Re: Replace trivial pcase occurrences in the Emacs sources |
Date: |
Wed, 31 Oct 2018 00:08:27 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) |
On Tue 30 Oct 2018, Clément Pit-Claudel wrote:
> On 30/10/2018 14.14, Alan Mackenzie wrote:
>> Hello, Clément.
>
> Hey Alan :)
>
>> On Tue, Oct 30, 2018 at 11:05:55 -0400, Clément Pit-Claudel wrote:
>>> On 30/10/2018 10.16, Andy Moreton wrote:
>>>> How are users meant to write reliable code using such constructs ?
>>
>>> Ensure that the pattern actually matches :)
>>
>> You mean, unless you can be 100% sure that the pattern will match, you
>> mustn't use pcase-... constructs. That sounds equivalent to saying you
>> shouldn't use these constructs at all.
>
> That's an odd conclusion.
It is a perfectly reasonable conclusion. `pcase-exhaustive' is available
as a replacement for `pcase', but a similar exhaustive matcher that
signals an error on pattern match failure is missing for all of the
other pcase constructs.
AndyM
- Re: Replace trivial pcase occurrences in the Emacs sources, (continued)
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/31
- 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, Clément Pit-Claudel, 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, Clément Pit-Claudel, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources,
Andy Moreton <=
- 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, 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, Andy Moreton, 2018/10/30