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: Sat, 24 Apr 2021 23:08:54 -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="22723"; 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 05:10:10 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 1laV9u-0005li-51 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 05:10:10 +0200 Original-Received: from localhost ([::1]:52462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laV9s-0002U4-RE for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Apr 2021 23:10:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laV9m-0002Ty-9R for bug-gnu-emacs@gnu.org; Sat, 24 Apr 2021 23:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laV9m-0008LP-1A for bug-gnu-emacs@gnu.org; Sat, 24 Apr 2021 23:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1laV9l-0001h4-R0 for bug-gnu-emacs@gnu.org; Sat, 24 Apr 2021 23:10: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 03:10: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.16193201456433 (code B ref 47992); Sun, 25 Apr 2021 03:10:01 +0000 Original-Received: (at 47992) by debbugs.gnu.org; 25 Apr 2021 03:09:05 +0000 Original-Received: from localhost ([127.0.0.1]:41766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laV8r-0001fh-AV for submit@debbugs.gnu.org; Sat, 24 Apr 2021 23:09:05 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laV8o-0001fC-V4 for 47992@debbugs.gnu.org; Sat, 24 Apr 2021 23:09:03 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A4209441AFD; Sat, 24 Apr 2021 23:08:57 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3B1EE441AFB; Sat, 24 Apr 2021 23:08:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1619320136; bh=PDV0UNc4vsVywe9bmKBcvEplY2use0RdawIieIU0f4w=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=lHNZK4UqVSWKzLlkbbdtchXG9ZuGeA44+GruL6oDFb4TRKimrseKzhwtsbnrNW9Io mjv11q0jQpsduLb7DEBn24lL8rofa3L4ww+yDS0US8VAECRtTHld794CGorhqVj2eg srYYnL6WgSIIbOBpRSMuFN+I9gQ8AKqp24qodmwuEpIhIF65V+KlqEGQcK3R/zd/FH qQfOQv5f/aTJtBLLMwLg85Y4WFhWk9DC9aJhonJ0gUhLlGFXR37By87BIVmCYMOcrd n6fuYXZlBVCln8FG+E3JThvu2GITLVUvTamZu2CHo164GE80dzrep2ZT7u2qAqbqaO KnfinucIm4A0A== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B2973120185; Sat, 24 Apr 2021 23:08:55 -0400 (EDT) In-Reply-To: (Drew Adams's message of "Sun, 25 Apr 2021 01:16:09 +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:204839 Archived-At: Drew, what does this rant have to do with add-hook? Please stay focused. The only relevant thing I saw in there was: >> Equality on functions is fundamentally undecidable [...] > 100% agreement. And there's no need for it, for Emacs. Huh, without it, there's no `remove-hook`. Stefan Drew Adams [2021-04-25 01:16:09] wrote: > Also what I hinted at (I didn't know whether we might > in fact already do that), and why I spoke specifically > of supporting also interpreted code. > > Emacs users often use Lisp as part of their interaction > with the editor, so: interpreted code. Lose that and > we lose Emacs. IMHO. > > And what would we be losing it for? Some performance > gain for closures used as hooks? If you're convinced > of the need or desirability of such a change... > > To be clear, by lose that I mean the ease of using Lisp > interactively, which today still means interpretation. > > You'll say that you'll replace all interpretation by > on-the-fly jitty compilation... That's also why I wrote > that hint about possibly doing something better with > closures wrt `equal'. We're not there - not by a long > shot. And doing what's been proposed here doesn't get > us there. > >> Equality on functions is fundamentally undecidable and it's nigh-on >> impossible to provide a sane and well-defined "approximation" of it >> either (at least not without significantly restricting the set of >> optimizations that the compiler can be allowed to perform). > > 100% agreement. And there's no need for it, for Emacs. > >> The upside is that this fundamental problem was the motivation for the >> development of type classes in Haskell which are a great feature >> (nowadays used in most proof assistants and in several other >> programming languages such as Scala and Rust). > > Meanwhile, back at the Emacs ranch, for actual users... > > (Not that a Haskell Emacs wouldn't be an interesting > project. Please go for it.)