From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: Re: Another pcase-lambda Date: Fri, 22 Sep 2017 17:37:07 -0400 Message-ID: <20170922213707.iujgqjjrg4vxcf4w@logos.localdomain> References: <20170919005637.GA19322@holos.localdomain> <87tvzwz3d2.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1506116274 1454 195.159.176.226 (22 Sep 2017 21:37:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 22 Sep 2017 21:37:54 +0000 (UTC) User-Agent: NeoMutt/20170912-13-728bb5 Cc: Stefan Monnier , emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 22 23:37:45 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvVdl-00085u-7U for ged-emacs-devel@m.gmane.org; Fri, 22 Sep 2017 23:37:41 +0200 Original-Received: from localhost ([::1]:32889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvVds-0003ty-M7 for ged-emacs-devel@m.gmane.org; Fri, 22 Sep 2017 17:37:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvVdI-0003q6-Jc for emacs-devel@gnu.org; Fri, 22 Sep 2017 17:37:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvVdF-0005l8-IM for emacs-devel@gnu.org; Fri, 22 Sep 2017 17:37:12 -0400 Original-Received: from mail-qt0-x22f.google.com ([2607:f8b0:400d:c0d::22f]:43707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvVdF-0005l4-Dv for emacs-devel@gnu.org; Fri, 22 Sep 2017 17:37:09 -0400 Original-Received: by mail-qt0-x22f.google.com with SMTP id i50so2382914qtf.0 for ; Fri, 22 Sep 2017 14:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LNycfrTYHjBxmwf49coVLG7+jvyr68Afl25Yrzlw5Ms=; b=XN2kAfv1vKsGzFJfyrpGRnq6ZCf7RxJBU/nU23n6mJ8QX1HRd9mp3q/+a/corHaXY8 GITpzR9PbDvSFiaTHmf+yVzWIy98nfFtzhyBUEsa2UIsd9fTVHYGmlrE5Jrc2vf29IVB 7KimbS2sCunu9wN4rA4XaXgGQkt6jzBuV/FKu2HJJWxRFuc0leSdeVN2IT4OUc3b1B3x cuoWffy+F2we0Z1qhBcVDvpCVpUxkgaPVGRejtAk53Tk0UBQIO8cl0OU2fanFnhCMEhS Q8Wsw3Tm/Ig8odeoEEdmlLsSfRqBH88POR7SKl17krwXaOuYgWYDn6GQzVlg8fP7LryN dfyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LNycfrTYHjBxmwf49coVLG7+jvyr68Afl25Yrzlw5Ms=; b=ITvKsCJ4CE9IEiDpnRb8hPc4YhL/FgWLka2MrhYXPDDKf1EEWb+YFJfp4aH8ZTeA+B 3/42vp3MZguw9UJMKvMfkmMBorBwnt6i8V+jNbGd87vRUTfXkb5J5Yp0vUDQqqTaWSIu Mb7DK3LGGE28GGFsZQ7+OFjVzhogSARm6JoK9aTrgR7yWFemhTRGeNS5C6mjlgsBepBt WHh+Brl1hJdKkGD+qbw4hN6UpDYBdz4GjmtfERw2hDYkNw18g/sGPSeqGCGV677QQgPR znp2xr0A6637rLmYnpUN0OcKcfOrphB6lKsCHeayq1dpgMuDoh29ghFNNO5/y0U1rNKq +i5A== X-Gm-Message-State: AHPjjUjReKp3UX8WbtRyG3RF7vVqPvjQ69UmUZV5sXNdGBurvRnt2K4V B1zEO86FcFOeYekc/RPUiv5KRRVRYsI= X-Google-Smtp-Source: AOwi7QAsPLbq5LnLkCTvu1KE/db4KFfgxygJUBVU4Js1YHqHB7gwsGLsRyQPcX38WrYQE/F+YZApPg== X-Received: by 10.237.35.238 with SMTP id k43mr885540qtc.214.1506116228795; Fri, 22 Sep 2017 14:37:08 -0700 (PDT) Original-Received: from logos.localdomain (pool-173-67-36-61.bltmmd.fios.verizon.net. [173.67.36.61]) by smtp.gmail.com with ESMTPSA id k11sm608006qkh.51.2017.09.22.14.37.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Sep 2017 14:37:07 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87tvzwz3d2.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:218712 Archived-At: On 21/09/17 at 11:40am, Michael Heerdegen wrote: > Mark Oteiza 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?