[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-25 1d4887a: Improve documentation of 'pcase'
From: |
Michael Heerdegen |
Subject: |
Re: emacs-25 1d4887a: Improve documentation of 'pcase' |
Date: |
Mon, 25 Jan 2016 17:43:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Eli Zaretskii <address@hidden> 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
> > > >
> > > > @address@hidden(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.
- Re: emacs-25 1d4887a: Improve documentation of 'pcase', Michael Heerdegen, 2016/01/23
- Re: emacs-25 1d4887a: Improve documentation of 'pcase', Eli Zaretskii, 2016/01/23
- Re: emacs-25 1d4887a: Improve documentation of 'pcase', Michael Heerdegen, 2016/01/25
- Re: emacs-25 1d4887a: Improve documentation of 'pcase', Stefan Monnier, 2016/01/25
- Re: emacs-25 1d4887a: Improve documentation of 'pcase', Michael Heerdegen, 2016/01/25
- RE: emacs-25 1d4887a: Improve documentation of 'pcase', Drew Adams, 2016/01/25
- Re: emacs-25 1d4887a: Improve documentation of 'pcase', Michael Heerdegen, 2016/01/25
- RE: emacs-25 1d4887a: Improve documentation of 'pcase', Drew Adams, 2016/01/25
- Re: emacs-25 1d4887a: Improve documentation of 'pcase', Stefan Monnier, 2016/01/25
- Re: emacs-25 1d4887a: Improve documentation of 'pcase', Eli Zaretskii, 2016/01/25
- Re: emacs-25 1d4887a: Improve documentation of 'pcase',
Michael Heerdegen <=