From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CEOCCp+Gtl+mCAAA0tVLHw (envelope-from ) for ; Thu, 19 Nov 2020 14:52:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mMRCBp+Gtl+1eAAAB5/wlQ (envelope-from ) for ; Thu, 19 Nov 2020 14:52:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CE2AF9403CA for ; Thu, 19 Nov 2020 14:52:14 +0000 (UTC) Received: from localhost ([::1]:45926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kflIC-0004ml-F8 for larch@yhetil.org; Thu, 19 Nov 2020 09:52:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kflH9-0004bu-Lo for emacs-orgmode@gnu.org; Thu, 19 Nov 2020 09:51:07 -0500 Received: from mail-ej1-f68.google.com ([209.85.218.68]:43560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kflH6-00070g-MN for emacs-orgmode@gnu.org; Thu, 19 Nov 2020 09:51:07 -0500 Received: by mail-ej1-f68.google.com with SMTP id k27so8253490ejs.10 for ; Thu, 19 Nov 2020 06:51:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=unllPNYFJSlXYLc5O1fvuRqNfLxlda6P1SDFSMxl2N0=; b=pkCU5b4Nlla8KLdsKbvGElKhADuVf6LOq8F2Cyoi9ZMSPJGBUJI5WoKOX50ZUgCk6Y I28w0NgRk6b6V+gB6532nxmqa/D5x0wzIICkivEBavLLZZHMa89c9dUypNDlruuwb3gp Qj1YkX649fT+AG70/jxgCml+xNjSMhVLN/3tyiak20xWYxMDZzKE9/uz360sCJmnk7+c M2R6KkdXMJgamH6Gnsu14Mrx5PyDTQCXyL40lhMuj7xVqajXBg95K6vAhEmCUmi/iOwl ySAujcG3pTRNqZHLrKCbzWdCW+/J6sEQOvcSSnwdmBT37dIHUa52PHPeeuDwMdXRTZRf NXzA== X-Gm-Message-State: AOAM5336NsAh9oc5ZzhOxiI5jLTep9OtjtroDSkW950uPcyN6ffwmDo4 W0fLihQJkpZipQeT/5EDdBGpckfz7Da1W/eXSUw= X-Google-Smtp-Source: ABdhPJxdfilWIb7G3QEL1xiOiwcD2plqyWV6+B3StYwmmVRn/WCAQtg04HxXo9Gz5UuzXZ5ATt1PMf03Lj3DU4Oa/NA= X-Received: by 2002:a17:906:d9d0:: with SMTP id qk16mr2147577ejb.420.1605797462807; Thu, 19 Nov 2020 06:51:02 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 19 Nov 2020 06:51:01 -0800 From: Stefan Kangas In-Reply-To: References: MIME-Version: 1.0 Date: Thu, 19 Nov 2020 06:51:01 -0800 Message-ID: Subject: Re: [PATCH] Remove redundant 'function's around lambda To: Neil Jerram Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=209.85.218.68; envelope-from=stefankangas@gmail.com; helo=mail-ej1-f68.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/19 09:51:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org-mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: X1fp42oB5Wyf Neil Jerram writes: >> I've been working on removing redundant `function' around `lambda' in >> Emacs core, > > I'm slightly curious about the history and reasoning around this. If I > understand correctly, (lambda ...) on its own has always worked, and it's > never been strictly necessary to add (quote ...) or (function ...) around > it. Then sometime (Emacs 19 or later, I think) it started being > recommended to use (function ...). > > Do you know why that recommendation started, and should I understand that > the reasoning for it has now evaporated? Correct, there is no reason to do this. I don't know the history here, and there are people on emacs-devel that would know better. I _suspect_ that the byte-compiler first got the capability to optimize calls to anonymous functions, but that it required to explicitly marked as such with `function'. Later, it grew the capability to recognize lambda as such automatically. But I don't know if that is correct; it's just a guess. In any case, they are no longer needed as lambda and lambda+function are equivalent. (Note that the worst thing here is to do `(quote (lambda ...))' as that defeats byte-compiler optimizations altogether.)