From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.bugs Subject: bug#28254: 26.0.50; SRFI-2 and-let* Date: Fri, 1 Sep 2017 22:10:43 -0400 Message-ID: <20170902021043.GA7509@holos.localdomain> References: <87a82kdb4e.fsf@holos> <87inh36sap.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: blaine.gmane.org 1504318282 6229 195.159.176.226 (2 Sep 2017 02:11:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Sep 2017 02:11:22 +0000 (UTC) User-Agent: Mutt/1.8.3 (2017-05-23) Cc: 28254@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 02 04:11:17 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dnxtt-000138-RL for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Sep 2017 04:11:09 +0200 Original-Received: from localhost ([::1]:45035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnxu0-0008T3-K0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Sep 2017 22:11:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnxtt-0008SD-Bn for bug-gnu-emacs@gnu.org; Fri, 01 Sep 2017 22:11:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnxto-00023X-EG for bug-gnu-emacs@gnu.org; Fri, 01 Sep 2017 22:11:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60497) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dnxto-000231-8U for bug-gnu-emacs@gnu.org; Fri, 01 Sep 2017 22:11:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dnxtm-0002cr-B6 for bug-gnu-emacs@gnu.org; Fri, 01 Sep 2017 22:11:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Sep 2017 02:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28254 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28254-submit@debbugs.gnu.org id=B28254.150431825310077 (code B ref 28254); Sat, 02 Sep 2017 02:11:02 +0000 Original-Received: (at 28254) by debbugs.gnu.org; 2 Sep 2017 02:10:53 +0000 Original-Received: from localhost ([127.0.0.1]:40945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnxtc-0002cT-Nd for submit@debbugs.gnu.org; Fri, 01 Sep 2017 22:10:52 -0400 Original-Received: from mail-qk0-f179.google.com ([209.85.220.179]:36854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnxtb-0002cG-4m for 28254@debbugs.gnu.org; Fri, 01 Sep 2017 22:10:51 -0400 Original-Received: by mail-qk0-f179.google.com with SMTP id o63so7400822qkb.3 for <28254@debbugs.gnu.org>; Fri, 01 Sep 2017 19:10:51 -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=SuZ96VE/dqHztARUidmMosmYEvQiHx57dy/TX+uLpVY=; b=x0cMaFtkcbwruKXQRvovKrH3TyK7AWM+NXD7G+q9YXK54MY1LgfuRwINaGZKEjTV6J ZlMnUWXFZRuzGJpXpe2jwstwhSzDIjqeZU4Ghh+Fwn/Pvnp+SUSqH5NIZZHNP0LDCMnc r5/6jQNf5I8wDoOe4ZBEBxIBuOg84doKA4MRzDIMkvoKl2U3dgtDFYM/pC3JOi6/qd6M uy/o7TBDoTIV/D9WRzB67rUCN6EUMzeMVk2HALIUGYvhaEuuSDibLx0NnQ0HlnyWe4NS LZWk3pBhbM7HoUaGxLY92yPcL4MBZ5u/sSdlffSeqHAESlshJeahBZPqJoXAI1jlwqnI n2tw== 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=SuZ96VE/dqHztARUidmMosmYEvQiHx57dy/TX+uLpVY=; b=bdEQx0QMXt9u3azl35g/z0owgMfhrtK3M+OJ1FjpBXl67NdDstx9FYbX72Q4Uh2KtA BBmy0WgBDmK9jBVlP7fq4NApoXFp8Mznr58bLJU4S572B5TfRDxQx8t1fUEwRaT7VjMA TwP8aYSmjCte5iUd4swtysnu4XuSeCM5RC93S3OB1CjvIHbm/5v3kitoaFrdDAW8xrG6 QFkPNkyHmmQJD3pT92gAljjkqvnGZq8Nx9WkIQBG7pkFchhMMcCnhE63ADSeXaqZCyo5 PWZv782Xj0TrlYtYg2cx7hpJLysu+oYnBFMsefzVep9pKeYL/6p3cbK5HTDr57jId9ve lKHQ== X-Gm-Message-State: AHPjjUg335vuw5Dq86Ddw6aJ1zEhaz8kPEu6A3UnT0A5QMeW1DdpcLQl EJkTjHvw2c1JlOdthhQsMg== X-Google-Smtp-Source: ADKCNb7XlR/jP4/esQ8b5vKNvddDPbvQA7WIUQbod3NzrgxyPJahIiGHSoVb92G/kkD10Ux5b5sL/Q== X-Received: by 10.55.74.194 with SMTP id x185mr5058525qka.237.1504318245298; Fri, 01 Sep 2017 19:10:45 -0700 (PDT) Original-Received: from holos.localdomain (pool-173-64-88-95.bltmmd.fios.verizon.net. [173.64.88.95]) by smtp.gmail.com with ESMTPSA id a186sm164902qkg.13.2017.09.01.19.10.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Sep 2017 19:10:44 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id E329C69C52; Fri, 1 Sep 2017 22:10:43 -0400 (EDT) Content-Disposition: inline In-Reply-To: <87inh36sap.fsf@users.sourceforge.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136453 Archived-At: On 31/08/17 at 10:55pm, npostavs@users.sourceforge.net wrote: >Mark Oteiza writes: > >> its behavior overlaps with when-let* but each has things the other >> lacks. > >Can the differences be minimized? I think having a bunch of tiny >differences is not good for reader comprehension or code reuse. Understood. I was leaning toward putting and-let* in its own file because of the differences instead of having them all in the same place. I'd rather have no and-let* than a gimped and-let* (I shouldn't have made the alias, in retrospect). >How much would be lost if we implemented and-let* like this? > >(defmacro and-let* (varlist &rest body) > `(when-let* ,varlist > ,@(or body '(t)))) The (EXPR) part of it, e.g. (and-let* ((x ...) (y ...) ((x > y))) ...) where the body gets executed if x > y. I didn't try writing it in the style of if-let*--perhaps if-let* could be extended and all three macros would learn (EXPR). if-let* already has the single tuple quirk which differs from most (if not all?) lets in Elisp.