From: Mark Oteiza <mvoteiza@udel.edu>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Another pcase-lambda
Date: Fri, 22 Sep 2017 17:37:07 -0400 [thread overview]
Message-ID: <20170922213707.iujgqjjrg4vxcf4w@logos.localdomain> (raw)
In-Reply-To: <87tvzwz3d2.fsf@web.de>
On 21/09/17 at 11:40am, Michael Heerdegen wrote:
> Mark Oteiza <mvoteiza@udel.edu> writes:
>
> > (defmacro case-lambda (&rest spec)
> > "Return an arbitrary arity function."
> > (declare (indent 0) (debug (&rest (pcase-QPAT body))))
> > (let ((args (make-symbol "args")))
> > `(lambda (&rest ,args)
> > (pcase-exhaustive ,args ,@spec))))
>
> I think I would prefer to spell it out and use the expanded form
> instead. It's nice, but I'm not convinced it would be worth adding.
>
> OTOH, as an occasional user of `pcase-lambda' I know that it's a bit
> cumbersome to use. But `case-lambda' defers all calculation into the
> argument list - I'm not sure if this is so useful all the time.
Thanks. I just always expect pcase-lambda to behave more like pcase,
hence I wrote this.
> BTW, what I sometimes do miss is `pcase-defun'.
Was that a thing that existed?
next prev parent reply other threads:[~2017-09-22 21:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 0:56 Another pcase-lambda Mark Oteiza
2017-09-21 11:40 ` Michael Heerdegen
2017-09-22 21:37 ` Mark Oteiza [this message]
2017-09-22 21:50 ` Clément Pit-Claudel
2017-09-23 14:25 ` Michael Heerdegen
2017-09-23 14:29 ` Stefan Monnier
2017-09-23 15:31 ` Michael Heerdegen
2017-09-28 21:11 ` Ted Zlatanov
2017-10-04 11:03 ` Michael Heerdegen
2017-10-04 16:12 ` Ted Zlatanov
2017-10-05 3:13 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170922213707.iujgqjjrg4vxcf4w@logos.localdomain \
--to=mvoteiza@udel.edu \
--cc=emacs-devel@gnu.org \
--cc=michael_heerdegen@web.de \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.