From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook` Date: Mon, 05 Jul 2021 14:39:53 +0200 Message-ID: <87zgv1ylwm.fsf@gnus.org> References: <87mttdh57n.fsf@gnus.org> <877di6udfy.fsf@web.de> <87wnq6opfo.fsf@gnus.org> <875yxqrekx.fsf@web.de> <87sg0uokh8.fsf@gnus.org> <87eece66tc.fsf@web.de> <87r1ge42wk.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4564"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Heerdegen , Daniel Mendler , "47992@debbugs.gnu.org" <47992@debbugs.gnu.org>, "monnier@iro.umontreal.ca" , "jakanakaevangeli@chiru.no" To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 05 14:42:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1m0NvR-0000xg-Hp for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 14:42:13 +0200 Original-Received: from localhost ([::1]:34536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0NvQ-0000gz-7e for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 08:42:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0NuI-0007OY-Fl for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 08:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0NuI-0008UD-7e for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 08:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0NuI-0000fe-6E for bug-gnu-emacs@gnu.org; Mon, 05 Jul 2021 08:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jul 2021 12:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47992 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 47992-submit@debbugs.gnu.org id=B47992.16254888082496 (code B ref 47992); Mon, 05 Jul 2021 12:41:02 +0000 Original-Received: (at 47992) by debbugs.gnu.org; 5 Jul 2021 12:40:08 +0000 Original-Received: from localhost ([127.0.0.1]:44369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0NtP-0000eC-WF for submit@debbugs.gnu.org; Mon, 05 Jul 2021 08:40:08 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:56856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0NtN-0000dX-Kv for 47992@debbugs.gnu.org; Mon, 05 Jul 2021 08:40:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VMkNp1G5QSOCufpSScZlQX3Mgqxly3Jhhmn0uKoaDrs=; b=rwb/VtaUUva7snMm2gpD2SN3yz b/fRiVn5zLPUIDHiO7m0nS2f8zsiAAMZTx/Hl5Rx+OhKIX/TFzfkuvxGkwzp9aZ01ifkraqXRlT98 eCh44lVz7S/5PrxLH1lytWKV/mKlD0cj76wCExMsmagbLLgQg4DHlfyQEsaPAwaRjjZI=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0NtB-00049F-PC; Mon, 05 Jul 2021 14:39:56 +0200 In-Reply-To: (Drew Adams's message of "Sun, 4 Jul 2021 17:08:00 +0000") X-Now-Playing: Narrow Sea's _Caroline Shaw: Narrow Sea_: "Pt. 2 (feat. Dawn Upshaw, Gilbert Kalish)" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209450 Archived-At: Drew Adams writes: > FWIW, I disagree. There's no real need for such > a "new form". > > I think the use case you've imagined for it is a > s t r e t c h . Users will just as likely avoid > making any of your new forms as they avoid named > functions now. Languages that have added naming to their lambdas mostly do so because it eases debugging and the like. We're going to see more and more code in Emacs that's based on closures, which means that our backtraces will just contain a bunch of unnamed lambda forms, called from asynchronous contexts, with no easy way for xref to jump to the location(s) where they were defined, and profiling will have the same problem. It's true that users will commonly avoid naming their lambdas, but library makers (in Javascript, which has named lambdas) often do put them in -- to aid debugging and profiling. My suggestion, though, for the particular usage in hooks we were discussing here, was that the new `push-hook' (or whatever) function would disallow using anonymous lambdas, thereby forcing users to name their lambdas (in this context). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no