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: if-let/if-let*/and-let/.. Date: Tue, 13 Feb 2018 19:23:04 +0100 Message-ID: <87mv0crbp3.fsf@web.de> References: <87wozijhpk.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1518547598 1716 195.159.176.226 (13 Feb 2018 18:46:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Feb 2018 18:46:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Mark Oteiza , emacs-devel@gnu.org, npostavs@users.sourceforge.net To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 13 19:46:33 2018 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 1elfak-0007S8-Li for ged-emacs-devel@m.gmane.org; Tue, 13 Feb 2018 19:46:10 +0100 Original-Received: from localhost ([::1]:36856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elfcm-0005Xz-JD for ged-emacs-devel@m.gmane.org; Tue, 13 Feb 2018 13:48:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elfEm-00044k-02 for emacs-devel@gnu.org; Tue, 13 Feb 2018 13:23:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elfEh-0002Rg-To for emacs-devel@gnu.org; Tue, 13 Feb 2018 13:23:27 -0500 Original-Received: from mout.web.de ([212.227.17.12]:59941) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elfEh-0002KJ-J8 for emacs-devel@gnu.org; Tue, 13 Feb 2018 13:23:23 -0500 Original-Received: from drachen.dragon ([188.99.169.170]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M57Vi-1ebQc109Rm-00zGPL; Tue, 13 Feb 2018 19:23:07 +0100 In-Reply-To: (Stefan Monnier's message of "Mon, 12 Feb 2018 12:32:06 -0500") X-Provags-ID: V03:K0:ptJveQzjBEqL5xTj2n17hRtGKszZQ70qETQ2atrwv3tS7g/dDwY 5CqEVBbAmypwjMZkEaP3MS3KeQx7krbc2pFjcR23pkuzriT6u1oL83Yu+XASWh/cH2PYG+J lbeIU4r9J2Bfp7EOhxr0nCwFk8TkJqwBRi4j76ClpnDuddnvIknKAnOFJRAiFKcmLRzylo3 L/yC/8rE8UOxrU7Xd0Hkg== X-UI-Out-Filterresults: notjunk:1;V01:K0:GoEq1YeoO28=:guwtB89l2TJFMYCc88jgvg jde6H29o22vRmKyjGH443v4VbFeyFfu0JR36/LaRB4vMwLaIbaDfF2aWdJem/hPrYvwr3xiEd N4xkGE3oOI626eCA+yKSJ1ZFccLNXpombTcmHsS6Z9Idi667q8EzOKAnhsGpQ9GCwnPyx/nSB WX+ud3JMP8jpM0fUoxdZeWjB1IyvzYfn/CU3ll6rNIXSZ6lnwmG3+/Hpe8SOeWZ0bHLXSJ/Gv DabIfNwwmwPBKkGykKhOPV5Dbhce4uYUxaK4xadNPV2RnuHUA+E1sChfjrXMa9q/j9C8kOwC5 9s/lDSfKH+08usN07wlAZV6qVOLdtcg+f4+JrM7BYJMx6SNQlfmbjEt7EYPCRwQSDdR+IrDAr 59WO5/hmNZ1+jlTOVg46XeacZlyLJPVYc+/U1MJruMZh1b1CnsGs5aBMyNIHmkT4YIx3My0Xe Up7wC0TVP1IjI3k5aYElf0IqHjse/UfJD4ByV0i44KA3UO3onp/9hXS4KRLqV1T6xpPazq4ln 0Pl2ko1R//FVt/Phv2NanQ4lyF2dk6wKQAsNFfHA8tol/HdKKSLI09v18G+1dX08nAQroPwKl Zr3s9guk6/BcHGU2K+QfpLsLVBND+OnSPlQyK8+4gZDyuE1TUEkUNG5rhn/NSHuBdmX91Nh8t 9eb/4ksGMokluGvJ+ufd0VEPKLfTNoyphNugG0aAE3qereaDhRg7NrS7wDUqh0TpXu5R4Dy+m 0nRxOtGB8v3OQ515V9Qdrjqsu0POODof1j8ExuXIvtf9xNXXWmb6wCf83xWKzjKDg1VI5eTc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.12 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:222716 Archived-At: Stefan Monnier writes: > >>> - why do we have and-let* ? According to its docstring the only > >>> case when it differs from when-let* is when body is nil, but in > >>> that case you're better off moving the last binding to the body > >>> (and use when-let*). > >> > >> The discussion about this was in bug#28254. The original and-let* > >> version was much more different from `when-let*', but AFAIR Noam > >> vetoed against this version, so they got more similar in the end. > > > > Is it worth keeping this "more similar" result at all? I think it is worth it, for the same reason we keep having `when' though we have `if' or `and': to make code better readable and its intention better understandable. > >> The original reason was that we decided that the names without "*" are > >> quite confusing and we wanted to get rid of them in the future. > > > > Is the benefit of slightly reducing confusion (I really find it hard to > > believe the confusion is serious, since the dependencies between the > > different steps would make it rather inconvenient to provide a real > > "parallel-let" semantics) In my case, my brain always told me that the * name is the canonical one, so I always got errors. I think nobody thinks through what you said when writing code. > > worth the burden of those compatibility/obsolescence issues (I'd > > also mention the confusing aspect of having an extra * for a > > construct that doesn't exist without a *, even though traditionally > > the * is used to mark an "alternative" definition, as in list*, > > mapcar*, ...). I think when using `when-let' etc. more people have the analogy to `let' in mind than mapcar* vs. mapcar, but I see your point: the obsolescence issue is very unpleasant. > > Another question is why aren't when-let and when-let* aliases of > > each other? Currently we have 5 variants (2 of which are > > deprecated) each with very slightly different semantics. That makes no sense, indeed. Would keeping both names as aliases be ok to you? > PS: I'm also biased against when-let* because I find this * ugly. So, what are your suggestions? And @Mark: What do you think about Stefan's points? Michael.