emacs-devel
[Top][All Lists]
Advanced

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

Re: Instead of pcase


From: Emanuel Berg
Subject: Re: Instead of pcase
Date: Sat, 25 Nov 2023 04:08:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Jim Porter wrote:

> For cases like this, I hope to (at least partially) address
> it with better documentation. I'm not sure we can expect
> every instance of 'pcase' in the Emacs codebase to be a good
> teachable example for how to use 'pcase', but I do think we
> could achieve that with shortdocs. The shortdocs could start
> small with almost-trivial examples, and then build up to
> more-complex forms that show how the pieces interact.
>
> Broadly, my goal would be that anyone who already knows Lisp
> could load up the shortdocs for pcase and get the hang of
> 95% of it in a few minutes.
>
> (I also think we could improve the manuals and the
> docstring, but I think 'pcase' is a great candidate for
> teaching by example. The shortdoc system seems ideal
> for that.)

One could make the first examples as easy as possible to show
all the aspects of pcase use, this is how you do this, this is
how you do that, and so on, the bunch. It would include
terminology but only terminology that is visible in
that example.

Then there could be examples that included combinations of
such aspects, this is helpful to assimilate the
previous examples.

After that, actual but typical use cases from the
Emacs source.

After that, gray areas, weird border cases and so on, also
from the Emacs source (if we can find them - if not, all the
better).

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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