From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: master 8f0f851: * lisp/autoarg.el: Use lexical binding. Date: Wed, 29 Apr 2020 11:05:20 -0400 Message-ID: References: <20200419004503.26161.91884@vcs0.savannah.gnu.org> <20200419004504.C65772049B@vcs0.savannah.gnu.org> <026ef78c-3c5e-4fd8-8161-0cc2cf5771c0@default> <87o8rc2w6p.fsf@web.de> <718e93ef-f2a7-4272-9bd9-31b482409bc8@default> <87imhj2faz.fsf@t510.orion.oneofus.la> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="37221"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , Juanma Barranquero , Emacs developers , Stefan Kangas , Drew Adams , Stefan Monnier To: Vladimir Sedach Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 29 17:06:53 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jToIX-0009ak-6x for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Apr 2020 17:06:53 +0200 Original-Received: from localhost ([::1]:34212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jToIW-0000IK-5Y for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Apr 2020 11:06:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54084) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jToHN-0007PJ-4t for emacs-devel@gnu.org; Wed, 29 Apr 2020 11:05:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jToHL-0003L0-UF for emacs-devel@gnu.org; Wed, 29 Apr 2020 11:05:40 -0400 Original-Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]:46079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jToHL-0003Kf-Cv for emacs-devel@gnu.org; Wed, 29 Apr 2020 11:05:39 -0400 Original-Received: by mail-oi1-x234.google.com with SMTP id k133so2039881oih.12 for ; Wed, 29 Apr 2020 08:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yu/oRcWaTezahf8kjepxyksEAAFX04p6xEUM4f1S5aU=; b=kZDzqxBCo2cHmh+6pkbcBgQ1orGi0GU+UT6FLIaWM7GKzIwcNF9ULJ7WWYjtZP4C3E gscvtUHL2q3AMs6dSr8IZXc7UpIpnEPy19bba4kpVjGvLR8y6Nv7uP+nuC3z6C1iQojL b/d5JkcoebXFVpdZoBoGw5s+T6IHyvWTEMxlHQR6yXasjkcANJbq8vP+vgrbh7AQ4Yys oppUa0LPCUWlvzsWOfHUUOwRK6EafLYsYUIANi5TW0TQ4qqgZbc+dkUSGUzG5eVHc3KZ YMhtfvEmUDe6hdX9StYNAONci5dqJeFl2E0rR4GplEJCIbz80inQAHlrE8M+LTqJcpsK EzmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yu/oRcWaTezahf8kjepxyksEAAFX04p6xEUM4f1S5aU=; b=hn8RubMPHxNYc7YpxOaOK+pqrPMYvPPGDtZNrANKoWgJKJgXYAK2jBe3fvOfUK9Yfa xBcgtyzMnkvcaGh2WcEnowfgslDseu9DNPQFuaMDOUxhGVkdKedMkTYCNDYY0ZYuIQCf UrOXRtn0mDENkLXYy3oC1NFDt8s7y0bM0n13sRuqWcW661i8xcp9zDvo2AI7d70+iIiL w9WNUCJ+2E+d/vKr5d+2qLCRXMu/x2dn5+CvghV6H7OpYzaNmIgubvOYs2nGoSdAQkAP 7Xl3AgVJVEQm0wYqUy5o9hVsoIpA7/cPFXh6f6o8pkIYlY2zuoJrrUmTdgwFB8eE5Kp5 PvFw== X-Gm-Message-State: AGi0PuYkQHpkVkX8J2Qn23wbXQXPx1eMScfHn7VHJ+m8ER0SIx4QIAXS 6KmxNZ+tWIJIlLfArNyqHyIIKpEkpZ4TVLgGe0g= X-Google-Smtp-Source: APiQypJ97NLILlAbu3dGhtlH7cjhuuynKFuwV/+CtnyU+TDQrQ2Xu/AjTovHIJhJrMLQS977ux5sLzV5idR4EBsGIpQ= X-Received: by 2002:a54:480a:: with SMTP id j10mr1883390oij.87.1588172737732; Wed, 29 Apr 2020 08:05:37 -0700 (PDT) In-Reply-To: <87imhj2faz.fsf@t510.orion.oneofus.la> Received-SPF: pass client-ip=2607:f8b0:4864:20::234; envelope-from=npostavs@gmail.com; helo=mail-oi1-x234.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248151 Archived-At: On Tue, 28 Apr 2020 at 22:35, Vladimir Sedach wrote: > Drew Adams writes: > > Why was RESULT deprecated? > > That is indeed bizarre. Why break existing Elisp code? David > Touretzky provides lots of examples of how to use RESULT with DOTIMES > and DOLIST in _Common Lisp: A Gentle Introduction_. I think it's useful to look at a couple of concrete examples from there. I found it at . There is this kind of usage (page 345): (defun it-intersection (x y) (let ((result-set nil)) (dolist (element x result-set) (when (member element y) (push element result-set))))) The argument for deprecating the RESULT param is mainly because code like this is (arguably) clearer when written (defun it-intersection (x y) (let ((result-set nil)) (dolist (element x) (when (member element y) (push element result-set))) result-set)) Because it's easier to quickly pick out what the return value is. Obviously it's a matter of taste to some degree though. There's another kind of usage that isn't as easily replaced (page 343): (defun check-all-odd (list-of-numbers) (dolist (e list-of-numbers t) (format t "~&Checking ~S..." e) (if (not (oddp e)) (return nil)))) But this relies on dolist establishing a block that be used with return. So in elisp, this should be done with cl-dolist which I believe everyone agrees will always support the RESULT argument.