unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: Stefan Monnier <monnier@IRO.UMontreal.CA>, emacs-devel@gnu.org
Subject: Re: pcase-if-let?
Date: Fri, 30 Mar 2018 07:09:15 +0200	[thread overview]
Message-ID: <87lgeatais.fsf@web.de> (raw)
In-Reply-To: <86eb8826-4460-4913-82d4-4be9191d8be5@default> (Drew Adams's message of "Thu, 29 Mar 2018 21:07:24 -0700 (PDT)")

Drew Adams <drew.adams@oracle.com> writes:

> > I call it `if-matching' for now (like in "if [given clauses are]
> > matching [do this else that]").
>
> IIUC (?), what distinguishes this from other pcase* stuff
> is that this one is about matching ALL of a set of clauses.

An important difference is also that it is not the canonical `pcase'
counterpart of something existing (as Stefan mentioned), which is why I
dropped the "pcase" suffix.

> It's not that this one is about matching and the others
> are not.  (And this one is a form of "if".)
>
> That's why I suggested something like:
>
>   `if-all-match' (or even just `if-all')
>
> Am I wrong that what is important here are "if" and "all",
> not "matching"?

As we want to drop the "pcase" suffix in this case, shouldn't the name
tell that this is about matching?  Else, "all" is IMHO meaningless.
OTOH adding "all" to the name would be ok for me, since it's not obvious
how the clauses are logically combined.


Michael.



  reply	other threads:[~2018-03-30  5:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 23:20 pcase-if-let? Michael Heerdegen
2018-03-28 23:54 ` pcase-if-let? Davis Herring
2018-03-29  0:21   ` pcase-if-let? Michael Heerdegen
2018-03-29  3:46     ` pcase-if-let? Michael Heerdegen
2018-03-29  4:14       ` pcase-if-let? Drew Adams
2018-03-29  4:39         ` pcase-if-let? Michael Heerdegen
2018-03-29  4:49           ` pcase-if-let? Drew Adams
2018-03-29  4:53           ` pcase-if-let? Stefan Monnier
2018-03-29  5:24             ` pcase-if-let? Michael Heerdegen
2018-03-29 11:59               ` pcase-if-let? Stefan Monnier
2018-03-30  1:52                 ` pcase-if-let? Michael Heerdegen
2018-03-30  4:07                   ` pcase-if-let? Drew Adams
2018-03-30  5:09                     ` Michael Heerdegen [this message]
2018-03-30 15:07                       ` pcase-if-let? Drew Adams
2018-03-30 23:22                         ` pcase-if-let? Michael Heerdegen
2018-04-17 20:26           ` pcase-if-let? Nathan Moreau
2018-04-17 21:04             ` pcase-if-let? Michael Heerdegen

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=87lgeatais.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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).