From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitri Paduchikh Newsgroups: gmane.emacs.devel Subject: Re: Anaphoric macros: increase visibility Date: Sat, 14 Jan 2017 11:25:15 +0500 Message-ID: <87h9529n04.fsf@gmail.com> References: <87wpdyivvf.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1484375145 4677 195.159.176.226 (14 Jan 2017 06:25:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 14 Jan 2017 06:25:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs developers , Tino Calancha To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 14 07:25:39 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 1cSHmG-0007aB-V1 for ged-emacs-devel@m.gmane.org; Sat, 14 Jan 2017 07:25:25 +0100 Original-Received: from localhost ([::1]:46618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSHmL-0004Ry-DF for ged-emacs-devel@m.gmane.org; Sat, 14 Jan 2017 01:25:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSHmF-0004Rh-2h for emacs-devel@gnu.org; Sat, 14 Jan 2017 01:25:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cSHmB-0005O9-UE for emacs-devel@gnu.org; Sat, 14 Jan 2017 01:25:23 -0500 Original-Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:33462) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cSHmB-0005NA-Lo for emacs-devel@gnu.org; Sat, 14 Jan 2017 01:25:19 -0500 Original-Received: by mail-lf0-x22c.google.com with SMTP id k86so51871169lfi.0 for ; Fri, 13 Jan 2017 22:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fOzyB8QH0NHO4WvKnQuSkgqLLeujvUrGu+aS+bUYkvI=; b=fD5vFQJZISuCAuhtheGUcf403E1EHKqRzSg+8SKOg3fKtwl0qqHhMsPh7Lnx41jJhS 2M6M6VOG5iY08OO02hzSLCCtq2YZ2WVnQxUpq/tBmvBIrdbJg4I3qrCL7+cM81BntRo2 VFS43wOHnF0TaLF9t0oTGSFc4ppxj65OhR+Ts8HwKy0iYMlbgHvcKir3FknH2jkJcU4u /j+QumrVv2CzG+ZPUqEfpRWVMCTtvYzROckEnYJePPXgS2G1kiOAgNr3MlHRSRsly7fH 4SEqlP8O+Q8qL4uZB3rFuXwJcXOqd/hTFJlv1XegnYZmaXNyo8H6YID/Od+ekKCELNqg HnIQ== 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; bh=fOzyB8QH0NHO4WvKnQuSkgqLLeujvUrGu+aS+bUYkvI=; b=XA66qoZFHFIhDtrcJxUUfEvfANEnfxxZSWmFbO0XDiTIs7Vch3K5hIcCxjBGJronc6 pO6LostA/OpSbFlK0ccVW3/bwjc+ckcTOxWp1RQ9gh+YY6nP2rNxzA/Z450yxnPV4ULY 0syWIVMkBepYBtfiIq1dHU8SxnCKXaAxbgiSC0Q/wBMsC2Laa9CsfGJEca50WJML1Ahl vj+Fn9ZwdVa0tiZoCEr1Gcku7g/ZIZiiFeKvNPM0VW874IJ4eBP028wPOMA0EzxrplSP gxc7Lg/LkRmS038uYuC+jyMHVzVEeCZN8jMzC+tM5h/2gIsbfgTfqXpBYhE8/0RyFrnO nfSg== X-Gm-Message-State: AIkVDXL04bvfKOkTAzRvAnEqEBjizCPWGkCvUoA6OxoJ9x4FFkPU9R4vN+1eN5wtWFPN7A== X-Received: by 10.25.24.156 with SMTP id 28mr9031560lfy.162.1484375117978; Fri, 13 Jan 2017 22:25:17 -0800 (PST) Original-Received: from gmail.com ([46.48.49.226]) by smtp.gmail.com with ESMTPSA id j11sm4218073lfd.23.2017.01.13.22.25.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Jan 2017 22:25:16 -0800 (PST) In-Reply-To: <87wpdyivvf.fsf@web.de> (Michael Heerdegen's message of "Fri, 13 Jan 2017 20:48:52 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22c 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:211263 Archived-At: Michael Heerdegen wrote: > Tino Calancha writes: >> Hi, >> >> I think anaphoric macros are a nice idiom; occasionally >> they allow to write very concise and clear expressions. >> >> AFAICS, in the Emacs tree they are just introduced in ibuf-macs.el >> (`ibuffer-aif', `ibuffer-awhen'). > We also already have `if-let' and `when-let' in "subr-x". They are like > `aif' and `awhen' but you specify "it" explicitly. This explicitness argument seems to be standard criticism against anaphoric macros. But it's easy to fix by providing new names for these macros: if-it, when-it, and so on. Besides being more explicit these names are more readable than aif and awhen. Comparing if-it, when-it with if-let, when-let, it seems clear that they represent different tradeoffs of simplicity vs. flexibility. With best regards Dmitri Paduchikh