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: On the naming/behavior of {if, when}-let (was Re: Anaphoric macros: increase visibility) Date: Sat, 14 Jan 2017 21:24:12 -0500 Message-ID: <878tqd12nn.fsf_-_@udel.edu> References: <87wpdyivvf.fsf@web.de> <87k29xqhqp.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1484447107 1172 195.159.176.226 (15 Jan 2017 02:25:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Jan 2017 02:25:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Emacs developers , Tino Calancha To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 15 03:25:03 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 1cSaV3-0007TP-2H for ged-emacs-devel@m.gmane.org; Sun, 15 Jan 2017 03:24:53 +0100 Original-Received: from localhost ([::1]:50060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSaV6-0006j9-KM for ged-emacs-devel@m.gmane.org; Sat, 14 Jan 2017 21:24:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSaUU-0006iq-BV for emacs-devel@gnu.org; Sat, 14 Jan 2017 21:24:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cSaUR-0006qn-8U for emacs-devel@gnu.org; Sat, 14 Jan 2017 21:24:18 -0500 Original-Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:35199) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cSaUR-0006qO-1X for emacs-devel@gnu.org; Sat, 14 Jan 2017 21:24:15 -0500 Original-Received: by mail-qk0-x231.google.com with SMTP id u25so89849580qki.2 for ; Sat, 14 Jan 2017 18:24:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=awqPHCvk+BbRGShsUNc9F8Jw0yUCWps5xaEdMPokI2E=; b=1StmqlrZdWdNmpnopMas3MS8KawvTyg0npBP/ApJ4ZCLQQna8w5nrM2hmX7mJaF8Xp xyFKeevcgze4dygPU6dEjHHTCPVcqZppYgoUx70Z2pvesRgEtcl6f9P55ZCpQsZ2W0ub S2X+S4tsMZYnxIggOi6Ly2L8TUw/QYB2DMzNRxiH3ZM/u+k2YPRUJcE1C0NUpgYxoYvx R7CPzEgBP3js90Mj/WnWdERn2oTEMgADfAWdCTfj2o1hlxAr6fiSKEfx8I1TB0akrNLw f0Z3pVyBYCn4e9Qf8CVzHHf1S98TvWl9+zan9EPhcN0MgxzNK9SOe8w7+A2DVQSqFjjU ldUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=awqPHCvk+BbRGShsUNc9F8Jw0yUCWps5xaEdMPokI2E=; b=gBRXNbVlPyVvmCD/2NpZoiWLRrqTZYrFwe7x+zw2BXu33aOzUknCeNxIBvCDKPc8B1 k7nvqzIpXstYRiDNiZTj6NzFf2I2X4bGuOI7mmMJvJWqrSdNkwAU8LLTYFF/xXPRsTO1 H/NkO8owznZ9AUNAcxeeNF0OdCdasxAoZ4kP5QwzlZTw2W+mYEp2Fm3Hwkgc9wYRZgVN 5+EBNMV2HY1RI55KWcIjYSVGTzTCHjl6+E38RTOtHhi6K1uabRmy6rZzBWsfOD/ybtCM vETtqB330a5SjNCD/N2wcrd/iJuzx5tdmPVcWEKRXGD3buFo4P7GGSofiWG76GF7zhR2 HyLA== X-Gm-Message-State: AIkVDXIVSk2C4+6x1M8LtvnpQXex4iwNJKX6bZTAaNJGi27il+0eFIEX+XcvrqcP12J1sY/9 X-Received: by 10.55.159.20 with SMTP id i20mr24007731qke.317.1484447054286; Sat, 14 Jan 2017 18:24:14 -0800 (PST) Original-Received: from holos.localdomain (pool-173-67-40-97.bltmmd.fios.verizon.net. [173.67.40.97]) by smtp.gmail.com with ESMTPSA id y23sm12841938qtc.38.2017.01.14.18.24.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jan 2017 18:24:13 -0800 (PST) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 4E4A466372; Sat, 14 Jan 2017 21:24:12 -0500 (EST) In-Reply-To: <87k29xqhqp.fsf@web.de> (Michael Heerdegen's message of "Sun, 15 Jan 2017 01:39:10 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::231 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:211305 Archived-At: Michael Heerdegen writes: > 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. There was a thread some time ago (I'd have to go dig for it) where someone asked why the names lacked the *. Seeing how they are implemented on top of let*, this should be a no brainer, right? Further, I think it's even more bizarre that if-let and when-let grew the single tuple special case, where one can write (if-let (foo bar) (message "%S" foo) (message "oh no")) ^^^^^^^^^ What makes these binding things special? May as well add brackets and whatever else from other lisps. =E2=80=A6 and yet there is no _actual_ if-let to the effect of: (let ((a foo) (b bar)) (if (and a b) 'yes 'no)) Though, for the above, I remember there being an argument against this being useful. IDK, I've written things like this before. > 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). I'd also like an and-let* (presumably aliased to when-let*).