unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: jwiegley@gmail.com, emacs-devel@gnu.org
Subject: Re: emacs-25 1d4887a: Improve documentation of 'pcase'
Date: Mon, 25 Jan 2016 17:43:26 +0100	[thread overview]
Message-ID: <8760yhpq35.fsf@web.de> (raw)
In-Reply-To: <83d1sp39xw.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 25 Jan 2016 18:23:07 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> > > > > The possible +alternatives are specified by @var{clauses},
> > > > > each of which must be a +list of the form @code{(@var{pattern}
> > > > > @var{body-forms})}.

> I didn't say body-forms is a list.  I just said that there can be more
> than one form there.

If a (meta) variable has a plural name, it's unexpected in Lisp that
it's not the name of a list or sequence, I think.


> > I just call them pcase patterns.
>
> Too wordy, IMO.  Try using that in the descriptions of each pattern,
> and you quickly get a mouthful.

In this context it's clear that we speak about pcase, so the generic
term pattern suffices.


> > Strings and floats don't only match themselves, but also any equal
> > string/float.  That's important, since not everything is always tested
> > with `euqal' - multiple occurrences of a symbol are turned into `eq'
> > tests, for example.
>
> But there's no reference to 'eq' or 'equal' in that text.  It just
> says "matches".

"Themselves" or "itself" in Lisp often means "only this object", that's
why I wanted to be precise.  But I won't argue about that one.


> > > > Maybe we should use
> > > > 
> > > >   @w{@code{(and x (pred numberp) (guard (< x 10)))}}

> There's no reason to believe readers will get such an expression from
> something that is clearly an incomplete fragment.

Ok, let's keep it.


> > > > The thing we name "qpattern" is without backquote, so with the
> > > > current wording, I would leave the backquote out.

> > I think Stefan has answered this question in a different post.
>
> He just said that he (and evidently you as well) use a different
> "language" when you talk about QPatterns.  I think my "language" is
> more easily understood and matches the actual usage better, even if
> it's pedantically less rigorous.

We speak about a language defined by a formal grammar, you about English
language.  I hope we can make the both fit.  Obscuring the formal
grammar will be confusing to some sort of people, depending on how they
build their mental models.


Michael.



      reply	other threads:[~2016-01-25 16:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160123102327.23087.15367@vcs.savannah.gnu.org>
     [not found] ` <E1aMvLr-00060z-TI@vcs.savannah.gnu.org>
2016-01-23 11:38   ` emacs-25 1d4887a: Improve documentation of 'pcase' Michael Heerdegen
2016-01-23 13:27     ` Eli Zaretskii
2016-01-25 13:49       ` Michael Heerdegen
2016-01-25 14:36         ` Stefan Monnier
2016-01-25 15:29           ` Michael Heerdegen
2016-01-25 15:56             ` Drew Adams
2016-01-25 16:10               ` Michael Heerdegen
2016-01-25 16:48                 ` Drew Adams
2016-01-25 16:15             ` Stefan Monnier
2016-01-25 16:23         ` Eli Zaretskii
2016-01-25 16:43           ` Michael Heerdegen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760yhpq35.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jwiegley@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).