Subject: Re: bug#13126: 24.3.50; (WISH) Document pcase in Info manual

From: Stefan Monnier <[email-masked]>
Date: Thu, 13 Dec 2012 12:37:28 -0500

>>> Thanks.  `pcase' seemed a good replacement for `case'.
>> While it's not a plug-in replacement, it provides a superset of the
>> features of case, yes.
> pcase also reminds me of CL's case.  Btw, you know in what version of
> Emacs did pcase made it's appearance.

Probably 24.1.  You'd have to check the NEWS file.

> Provide a BNF and document TERMINALS before NON-TERMINALS. (Currently it
> seems other way round).

I don't think a BNF spec has its place there.  It's fine for the
docstring, but the point of this lispref subsection is to give an
introduction to `pcase'.

> May be replace the example snippets with a /simple/ and /cohesive/
> example.

Do you think snippet 1 is not sufficiently simple?

> I found Snippet 2 "too abstract" and leaves a lot to the
> imagination of the reader.

For those readers not familiar enough with functional programming,
I could tweak it, maybe replacing `call' and `fn' cases with `(neg ,x)
and `(if ,t ,e1 ,e2)?  Would that help?

The problem I see with your snippets is that they're too long.

        Stefan