From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69832: 30.0.50; Should `subr-primitive-p` apply to special-forms? Date: Sun, 17 Mar 2024 08:01:38 +0200 Message-ID: <86cyrt5rct.fsf@gnu.org> References: <86il1m55bk.fsf@gnu.org> <86edca53u2.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69832@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 17 07:03:16 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 1rljc4-0004q2-IB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Mar 2024 07:03:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rljbX-0001g8-SS; Sun, 17 Mar 2024 02:02:43 -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 1rljbJ-0001dY-Op for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2024 02:02:34 -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 1rljbF-0007wf-3O for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2024 02:02:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rljbq-0005mE-6j for bug-gnu-emacs@gnu.org; Sun, 17 Mar 2024 02:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Mar 2024 06:03: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.171065534822143 (code B ref 69832); Sun, 17 Mar 2024 06:03:02 +0000 Original-Received: (at 69832) by debbugs.gnu.org; 17 Mar 2024 06:02:28 +0000 Original-Received: from localhost ([127.0.0.1]:57523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rljbI-0005l5-6A for submit@debbugs.gnu.org; Sun, 17 Mar 2024 02:02:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rljbG-0005ks-Ep for 69832@debbugs.gnu.org; Sun, 17 Mar 2024 02:02:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rljaZ-0007nt-LG; Sun, 17 Mar 2024 02:01:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Gp7F07wyufk+U2yu0bsY1clZ116kdbb7GX/+eG2/XDQ=; b=lLPR7PzQiXZK +Qgrk8EkOEJRTa3XuhkqUvXcXzAueTsqV8SZJn5TnanNvun1QpA8Sps0pOXapfda8G675mVNX+wrl SaBQm+7lIB85BxJm0hAD2VKW6S28JdMv3vVq5oUnraulM6oU4ZxwDi2mWz9/KMAO+jQR7bsA/Rp/1 5g4MPZMChBh4C8iwTaLi5j19QayKHe9V0irfyBcj09ym0yOhusfLwzzGoCn3Iol6QKJuxO5h31ZAm mZYWLFYRYViGQiXBGeUY23wP71Hc0APXVFgRBcxqv6UwT9WJ7wTl8deGOQBoNDezW4Rg1nJ/7ucPN w0g5QhiPI5MVAHVQQKwK8g==; In-Reply-To: (message from Stefan Monnier on Sat, 16 Mar 2024 19:08:56 -0400) 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:281750 Archived-At: > From: Stefan Monnier > Cc: 69832@debbugs.gnu.org > Date: Sat, 16 Mar 2024 19:08:56 -0400 > > >> - 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. Well, you asked for opinions, and here you have mine. I stand by it.