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 COEgD3iMtl9IQwAA0tVLHw (envelope-from ) for ; Thu, 19 Nov 2020 15:17:12 +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 gGX2CniMtl80CwAAB5/wlQ (envelope-from ) for ; Thu, 19 Nov 2020 15:17:12 +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 AB8769404E4 for ; Thu, 19 Nov 2020 15:17:11 +0000 (UTC) Received: from localhost ([::1]:41982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kflgM-0007eM-8f for larch@yhetil.org; Thu, 19 Nov 2020 10:17:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kflfg-0007eF-Vh for emacs-orgmode@gnu.org; Thu, 19 Nov 2020 10:16:28 -0500 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]:37829) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kflfe-0007cX-3i for emacs-orgmode@gnu.org; Thu, 19 Nov 2020 10:16:28 -0500 Received: by mail-ej1-x643.google.com with SMTP id f20so8411180ejz.4 for ; Thu, 19 Nov 2020 07:16:25 -0800 (PST) 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=CHcDe3svsmZAaMfkVxCSj80v2PBM1/JmiDkyt7kLgH0=; b=Zy4ieU0Mwh2hNd+yToWINfvfqFJwycsQV9Egrmjo/Ak0lseLwuBgF7a5S1G8E0jAiV 1AR0vyQ9HBK4Kv4I9UUY04E1N90ZfWlgAylkKMv/3d0jXUOzBag2VSBNyUYBFL1uBuNc QtzSCf4exqZS0M4KlYtUEFCvyQ7bVovY5GAyyfkPlD6e8evgRvrsrxiVZgMqn7eXthDD 1CXDfQaphJIPgAT8jw6N52IbGDUxL+Esxt2QIQfQFildLhp/ljQGHKwtxUbbtbuUwEhl fr6MrZP6a4LQkfURfFPy1iSDfCNu+iqaTtuWVOd92PHoW5KVX+Dcb3/0gmckKeKE4y1l Wtlw== 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=CHcDe3svsmZAaMfkVxCSj80v2PBM1/JmiDkyt7kLgH0=; b=jnRHLUeoqIfqfWId9wli/YT99qE1FXu+W6UF194iJhag2DXRTg0zui+vOqlfxTX+P8 ype+R2XwkxYwjPumysYXaNOBiF2+u68sKKOI0vcxAUcy+eEo4QPBRwPNwn6JdwUzL0YN HTFuQNohlvInSh5Sl6+xyb62+EWW8SMlKecwyk33uWJR5l/VLs61Mh1gm0/34RNdsHE0 9zp2K9if3U2WRcQIAwwEd4Evaf6LNFiz3hOmEh3aviJqgGoDDjX+zv0F13Cyqf7iZsC5 Yfyt7YfMpwzOJaqrgERrY8exhrpaDcpGJqDOIr89sy0HFZTdj/zTDvurdeWhftxhvg29 zbyQ== X-Gm-Message-State: AOAM533gs8G1eMma4Fr9GnNy6xN1ZL3kZWk9Fnv2Qmbxok7NPjpeX/UD MAqs+dtZehRL9f3J3kdEAtVb9GXQltUb3PGSaTLCsPo43cg= X-Google-Smtp-Source: ABdhPJwA/pEm5OVV3vIUR4sYiEraZ8le86r8BVpPGrGpVTMIOH80LTa2v8YjXd1Hr2aNde2PEAgDoYvPakoO/L03pzQ= X-Received: by 2002:a17:906:af8b:: with SMTP id mj11mr11384701ejb.170.1605798984285; Thu, 19 Nov 2020 07:16:24 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Neil Jerram Date: Thu, 19 Nov 2020 15:16:10 +0000 Message-ID: Subject: Re: [PATCH] Remove redundant 'function's around lambda To: Stefan Kangas Content-Type: multipart/alternative; boundary="0000000000000a013705b47736a5" Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=neiljerram@gmail.com; helo=mail-ej1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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=pass header.d=gmail.com header.s=20161025 header.b=Zy4ieU0M; dmarc=pass (policy=none) header.from=gmail.com; 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.71 X-TUID: 6uMnbvXWPVAl --0000000000000a013705b47736a5 Content-Type: text/plain; charset="UTF-8" On Thu, 19 Nov 2020 at 14:51, Stefan Kangas wrote: > 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.) > Many thanks Stefan! --0000000000000a013705b47736a5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, 19 Nov 2020 at 14:51, Stefan Kang= as <stefan@marxist.se> wrote= :
Neil Jerram <neiljerram@gmail.com> 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.= =C2=A0 If I
> understand correctly, (lambda ...) on its own has always worked, and i= t's
> never been strictly necessary to add (quote ...) or (function ...) aro= und
> it.=C2=A0 Then sometime (Emacs 19 or later, I think) it started being<= br> > recommended to use (function ...).
>
> Do you know why that recommendation started, and should I understand t= hat
> 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'.=C2=A0 Later, it grew the capability to recogni= ze
lambda as such automatically.=C2=A0 But I don't know if that is correct= ; it's
just a guess.=C2=A0 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.)

<= /div>
Many thanks Stefan!

--0000000000000a013705b47736a5--