From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69832: 30.0.50; Should `subr-primitive-p` apply to special-forms? Date: Sat, 16 Mar 2024 19:08:56 -0400 Message-ID: References: <86il1m55bk.fsf@gnu.org> <86edca53u2.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1535"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69832@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 17 00:09:48 2024 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 1rld9v-0000CP-LH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Mar 2024 00:09:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rld9f-00083z-85; Sat, 16 Mar 2024 19:09:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rld9a-000821-0L for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 19:09:27 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rld9Y-0000gQ-Un for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 19:09:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rldAA-0002jH-3F for bug-gnu-emacs@gnu.org; Sat, 16 Mar 2024 19:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Mar 2024 23:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69832 X-GNU-PR-Package: emacs Original-Received: via spool by 69832-submit@debbugs.gnu.org id=B69832.171063058910467 (code B ref 69832); Sat, 16 Mar 2024 23:10:02 +0000 Original-Received: (at 69832) by debbugs.gnu.org; 16 Mar 2024 23:09:49 +0000 Original-Received: from localhost ([127.0.0.1]:57298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rld9x-0002ik-CO for submit@debbugs.gnu.org; Sat, 16 Mar 2024 19:09:49 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rld9w-0002iU-0U for 69832@debbugs.gnu.org; Sat, 16 Mar 2024 19:09:48 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id BF11080D40; Sat, 16 Mar 2024 19:09:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1710630543; bh=KZGY3wbvnhwCvHJGaTQiCl/zD4vsTcQE2LqTNzvZBJw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QosGXfhnv4t+I/A1iEpevAcY5OdDglXJODUNTtigzihYA02ntdKJWGyQSpcF7rxxY Rxis6Nv3pcqT/huqV96URomQ8GddXYrdMR2tJmIejDgS3a3EKJm+Ws06PbOD8N0FJ/ IUSOkOYjfIBsyLq14J50wbjbYv/qOqBPvkV8IV4FruOZ3CzLq3od1Aq3VxsKCC1GcR 1aAIRkKCLwnhoDAduvB6FnQDlPJ1dc74XKLH9FYt3RDPdG8XP0WkdzsZCVP1F6QROu JcIFDTwcQbWvUK2vZtE9cmxoPqsRhpmFG3OqZuEdWYjHIqlLqw3USisZNBhYOgqPss 0SSgqOzItU8/w== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A59B680946; Sat, 16 Mar 2024 19:09:03 -0400 (EDT) Original-Received: from alfajor (unknown [104.247.238.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7E046120642; Sat, 16 Mar 2024 19:09:03 -0400 (EDT) In-Reply-To: <86edca53u2.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Mar 2024 22:17:25 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281740 Archived-At: >> - If we introduce `subr-function-p`, then `subr-primitive-p` is only >> "useful" at one place any more, and we can trivially rewrite the code to >> avoid it, so we could get rid of it. > I don't see why we should get rid of subr-primitive-p. Because there's no point keeping it if all its users could just as well use `subr-function-p` or `subr-native-elisp-p` instead. The information provided by the current semantics of `subr-primitive-p` is "the source code was written in C", and that kind of information is extremely rarely useful because ELisp code can't really act on that information. The only counter example is indeed when that ELisp code is trying to jump to the source code. > We can leave it alone, used in that single place where it's useful, > and let 3rd party packages use it if they want. It'll mostly lead to 3rd party users either wondering which one they should use, or picking one arbitrarily without knowing the consequences. Choice is good when the various alternatives have each their own strengths and weaknesses, but here it's just extra complexity with no benefit. If we introduce `subr-function-p` then we should mark `sur-primitive-p` as obsolete. And the only thing we gained in the process is churn (it won't avoid regressions because the rare few users will likely just blindly replace the old one with the new one). >> - These functions are used very rarely, the majority is in core files, >> and the rest is mostly used to generate human-facing descriptions >> so the risk of breakage is low and the kind of breakage is likely to >> have a low impact. > Yes, but I've heard these famous last words one or two times too > many... We make backward incompatible changes all the time in Emacs, and the vast majority of them turns out fine. I searched for `subr-primitive-p` in Emacs, GNU ELPA, NonGNU ELPA, and Melpa before making my suggestion. Stefan