From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Anaphoric macros: increase visibility Date: Sun, 15 Jan 2017 01:39:10 +0100 Message-ID: <87k29xqhqp.fsf@web.de> References: <87wpdyivvf.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1484440817 30610 195.159.176.226 (15 Jan 2017 00:40:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Jan 2017 00:40:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux) Cc: Emacs developers To: Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 15 01:40:07 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 1cSYrO-0005ag-AK for ged-emacs-devel@m.gmane.org; Sun, 15 Jan 2017 01:39:50 +0100 Original-Received: from localhost ([::1]:49836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSYrS-0008Eh-Ju for ged-emacs-devel@m.gmane.org; Sat, 14 Jan 2017 19:39:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSYqr-0008EQ-R6 for emacs-devel@gnu.org; Sat, 14 Jan 2017 19:39:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cSYqo-0003A7-Ns for emacs-devel@gnu.org; Sat, 14 Jan 2017 19:39:17 -0500 Original-Received: from mout.web.de ([217.72.192.78]:52309) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cSYqo-00039o-EZ for emacs-devel@gnu.org; Sat, 14 Jan 2017 19:39:14 -0500 Original-Received: from drachen.dragon ([188.110.141.66]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MMmx9-1cMoM43Hvb-008aNI; Sun, 15 Jan 2017 01:39:11 +0100 X-Provags-ID: V03:K0:UhtaLi2eQ/Ijf6wNjUNX/6LSts9H9R+pbpHFIEpNJKNy+2uvWhh QN/3HY6IsacdkYhKagTlkTsBWkkDO+j5Pb6HV5h40m5trKsDVAl+fgtBfbtdydKIICECZMQ 0rU6bax/09/PTe5fb+3YDmLi7i6kl6fWLZF31cgLmJxsyP7XX4xXMEw6inYeh6nTwCwSrbJ nURBHD+ZTRSB8/GyB6Pww== X-UI-Out-Filterresults: notjunk:1;V01:K0:/GO05CkkzTE=:IkxtboICTZICJG4mkYXayK zgh1mwSW9cCoCu60gHpjmedr1QbWBtGGXMzmK55YC+uBKRubr+YEtV7BoPAFV/Bync6AaOs8m C7b/XFVJeblMSlc71Co0b+xnb2bA9qz/ywG4z8Hui46QapgtXEBE/i3ReqLTKBu4qsDb32zW+ jUtQIpYwRS2eZM8HCiLOP3asqNFD/o2yZFzaJt6D4YDsnSedoVupLqCXsDC0Tbwu1ue60IfJg K4hZ0GW1YqMb8hdFffmrfUMc8Dv948DvWBbJPQH5U7M7FX5ziyj8OEVBnfVobdzi1WeP3gmIg OeAK92BBQl3oRaQrchwvsEUdXrg7+vA77yDqSlj6OIfJSdqFm2vsM0jAHHy3PQHzONC/7OrJE UHavQbm6h268kLSVDOfeUmYK0Gz26+A2acs/5u68C0Gj2b0aafk8qftVlZH+uoSv/s/XKxa2X dZxbo4H8tGEQctUDYdPx6RJLd/S/tbi+x12ZH6qpoCupqAsSS6O9OIQ/3SX29nGUvmbJtv19v wrVZSEUAwn23xVet9oyKetrl0b9QlT08x+tay8+Hl0DS9tMjWmSnTmcOiKAzcCK3efThd8GUB WxjefGxJGOWHdYL4EgS2jOUfWT32FjS/CYg+fAjNFNVWgC9XzMzy5Jb/u8nTHe7JmZfYCEHvT yhSlZmuNxjNZHoTkCGHDkO5J66krjG2uvLPd26e3um1eIBSefE0fF3aPjfy6exR9lYerx83dn mKi2ZMVxugmZUmgMbgwHsA8KYHjgczrtXmMl0val5t38BkYIcqajr0CK6jr2d95pn7Fa8j93 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.78 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:211302 Archived-At: Hi Tino, > I wonder if it has sense to increase that family with a while-let > (maybe others in case they are useful). > > From 60f26b512b191add12a0c91dc4d7ff95aba080d9 Mon Sep 17 00:00:00 2001 > From: Tino Calancha > Date: Sat, 14 Jan 2017 14:25:42 +0900 > Subject: [PATCH] * lisp/emacs-lisp/subr-x.el (while-let): New macro. Maybe. I'm using `when-let' and `if-let' a lot, but I'm still not sure in which direction we should develop this approach. I personally prefer `when-let' and `if-let' over `awhen' and `aif'. I sometimes think that `if-let*' would be a better name for `if-let' because bindings can refer (and naturally most of the time do) refer to other bindings. I also often think that `and-let' (or `and-let*' ...) would be a better name for `when-let' (because the expressions for the bindings are `and'ed, sot the whole thing feels more like `and' to me). And I often think that it would be cool to couple them with pcase pattern matching. OTOH we already have `pcase-let', but I can't get along with its semantics, e.g. (pcase-let ((`(,a ,b) '(1 2 3))) (list a b)) ==> (1 2) although the pattern doesn't match. Anyway, I think we should have an imagination of where the travel should end before adding more *-let macros. Regards, Michael.