[Top][All Lists]

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

Re: The poor state of documentation of pcase like things.

From: Michael Heerdegen
Subject: Re: The poor state of documentation of pcase like things.
Date: Sat, 19 Dec 2015 21:58:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> If we want to do that, we need to rewrite both the ELisp manual and
> the doc string to never use these.  With the current text of the
> manual, you simply cannot ignore them.  (Personally, I think trying to
> stop using them is futile, since so many people who actively use
> 'pcase' use these terms freely in their messages and other text they
> write.  But that's me.)

The terms are useful when explaining the semantics of ``'.  Using the
terms all the time can be confusing, however, because these terms are
completely unrelated to the semantics of other pcase pattern types.

> > If there are still examples like
> > 
> > >     (pcase value
> > >       (`1 (message "Matched a 1"))
> > >       (`2 (message "Matched a 2"))
> > >       (`"Hello" (message "Matched the string Hello")))
> > 
> > in the info manual, they should be changed to not use backquote.
> There are quite a few of these there.

Yip, I think they should be changed, for the same reason we prefer using
a simple quote over using backquote in Lisp when there is no unquoting
involved.  (And it looks unnecessarily weird...)

When pcase had been invented, it was more or less destructuring with
tests.  Now, the thing has developed, and ` does not play such an
central role anymore (though it's still important) because we found out
that it is much more useful for matching non-list values than we had
expected (with "we" I mean Stefan, and that's just my version of the


reply via email to

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