From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook` Date: Sun, 25 Apr 2021 09:52:45 -0400 Message-ID: References: <090f8bd5-368c-5684-85e1-65420049d47a@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34206"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Daniel Mendler , "47992@debbugs.gnu.org" <47992@debbugs.gnu.org>, "jakanakaevangeli@chiru.no" To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 25 15:53:16 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 1lafCG-0008n4-I0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 15:53:16 +0200 Original-Received: from localhost ([::1]:39760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lafCF-0007aY-LT for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 09:53:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lafC2-0007aS-GA for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 09:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lafC1-0004e2-O9 for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 09:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lafC1-0003A2-Kn for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 09:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Apr 2021 13:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47992 X-GNU-PR-Package: emacs Original-Received: via spool by 47992-submit@debbugs.gnu.org id=B47992.161935877712140 (code B ref 47992); Sun, 25 Apr 2021 13:53:01 +0000 Original-Received: (at 47992) by debbugs.gnu.org; 25 Apr 2021 13:52:57 +0000 Original-Received: from localhost ([127.0.0.1]:42257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lafBw-00039k-RX for submit@debbugs.gnu.org; Sun, 25 Apr 2021 09:52:57 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31375) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lafBu-00039W-IG for 47992@debbugs.gnu.org; Sun, 25 Apr 2021 09:52:55 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C6DE88089D; Sun, 25 Apr 2021 09:52:48 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 83743807A1; Sun, 25 Apr 2021 09:52:47 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619358767; bh=poPKby+nZr/YQOqjYp09v4yafMBSE8ejsici31KxwJo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hOyvI7VpuUk6QJxTKskLT9vW8VkGD4i2pxXH3nNsmOMzXCOP+pYaReq9AHekPGu8i wgcwqWWLRYGnJCoun+6udtC5lQ51d0i86kDYr+IPXr6tgY53xfpiZav1VeXsaPKwf2 dxxReQqap1h689yog9wVsWvNtYSQQxoOuWtgPK6SLn0+FWp+k1c6cPQOs9KBysb8iP u3bJQ/bdXI4yRfxye+qF8zTkOZywe3zMy+d4HVii4mEnkBsPFMdAhADP/NFEutxZtx +FEOfvOiRJFHfGdcXiyrRnvFBdIw991/kDg0cPw2nK2/G13NqLD1qPp3CtcH9gG/Ml MAg1dPj9NNcsA== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4212B120323; Sun, 25 Apr 2021 09:52:47 -0400 (EDT) In-Reply-To: (Drew Adams's message of "Sun, 25 Apr 2021 04:57:07 +0000") 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:204873 Archived-At: > Read what I said about _real_ functions, which is whose > equality is undecidable. `add/remove-hook` sadly lives in the real world. > As contrasted with the equality of Lisp "functions", represented as > symbols, strings, or lambda forms. Strings aren't used to represent functions in Lisp, and the case of lambda-forms is the case that's actually causing real performance problems in add/remove-hook (both interpreted and compiled). So, yes, symbols is the only option remaining, to enforce the `eq` semantics which seems to be at least as often what we want and doesn't suffer from performance problems. > The latter is certainly decidable, and it's what we use in > `remove-hook' to decide. My comment about decidability was just a side remark that doesn't really matter for this decision. I now regret mentioning it. Stefan