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#58513: describe-function should say that defconst variables are constant Date: Sat, 15 Oct 2022 12:04:17 +0200 Message-ID: <875ygl5roe.fsf@gnus.org> References: <87zgdy8ug8.fsf@gnus.org> <8fae3292e6c1b175853b557060d05487@webmail.orcon.net.nz> <87v8om8tok.fsf@gnus.org> <87edva8seu.fsf@gnus.org> <87sfjq7a91.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="24030"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Phil Sainty , Stefan Kangas , 58513@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 15 12:05:26 2022 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 1oje2n-0005x8-Oc for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Oct 2022 12:05:25 +0200 Original-Received: from localhost ([::1]:54182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oje2m-00034r-3i for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Oct 2022 06:05:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oje2U-00032l-Jp for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 06:05:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oje2Q-0004VH-Ci for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 06:05:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oje2Q-0002Q7-6f for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 06:05: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: Sat, 15 Oct 2022 10:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58513 X-GNU-PR-Package: emacs Original-Received: via spool by 58513-submit@debbugs.gnu.org id=B58513.16658282709258 (code B ref 58513); Sat, 15 Oct 2022 10:05:02 +0000 Original-Received: (at 58513) by debbugs.gnu.org; 15 Oct 2022 10:04:30 +0000 Original-Received: from localhost ([127.0.0.1]:39518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oje1u-0002PG-Ds for submit@debbugs.gnu.org; Sat, 15 Oct 2022 06:04:30 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:56036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oje1s-0002Oy-Mv for 58513@debbugs.gnu.org; Sat, 15 Oct 2022 06:04:29 -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=06b24jpI8QvCErf245/jVifvHeDFOR0nXg2yXOS8L5g=; b=K83mN40qZPNnbyKMyAA9xBhm+f m8R6+M9/NJlp4+JXeKP0HA9h6bXb+WI86cAF3bdwbwtlTCfi1Em7Tny4LeAyt83wHa9NdDiPlRtku mDGXV6fH0/p8iHCQfPFe9ptCZTAlH5EQfGTEJCXYKrqFzWWgNsd1lQbWlCDgwynV/hHk=; Original-Received: from [84.212.220.105] (helo=downe) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oje1j-0006ue-4o; Sat, 15 Oct 2022 12:04:21 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 14 Oct 2022 12:44:01 -0400") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWpSz40JSiDjbz/ ///rtNpNAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDwoAAv2DvjIAAAGgSURBVCjPNdDBatwwEAbg 32YFG59EkC49LhQ2fgq5dKHxSbtoBPEth0KjpzBLDyGnUupAc/IuMdjzlB05VL7Mx1gzowHg87f3 kOOgETam1husJAuz01bCCk0gRxutHXDqCxI4fSugd7XCZwTB0RmpkzEp8o/kSx7lt4mI7khju11h 6Z78tqoyDkSg02V77uFVtILYu7KHfTeWFAV8y/gpfWzR9sh3ghU0/nydgUGKkVKh5Iyc2dtQ5owN 9kB7Y8B7QAVzJGiDOQGHUDhBV891rqb6UE6J+QPPoVqYK4G0rzif6kUmoEOd47GUIeQ1a+Jr0TIW styxtC++MFjbFCUjUyXwQF13Zt4tlwimp/t0zlMWERd6uksuAyyglvtu2GTIptrUy/tGx3iW5X4S xOsvgSrcjbMUoRl/LDU3MkYynvGmqFlyR5I7Y0NX9rIukmqjt7cPg8Q58xhUXGOSQY+hiANP1L0y 43ugB5JpeZgZKU5HYin9d5exnJhfh8RvjPbIpuZhSrPceeHlR+JpkcUxfi95gcwrxs8fyAdLXLr/ +AcNOcONF1pRZwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0xMC0xNVQxMDowMDowMiswMDowMLDE cj4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMTAtMTVUMTA6MDA6MDIrMDA6MDDBmcqCAAAAAElF TkSuQmCC X-Now-Playing: Bill Callahan & Bonnie Prince Billy's _Blind Date Party (2)_: "Miracles" 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:245531 Archived-At: Stefan Monnier writes: > - since that new branch always signals an error (well, in my own code, > that is: I don't know what that branch would end up doing on `master` > where we'd want to be more careful about backward compatibility), it's > expected to be more-or-less never taken and even the most naive branch > predictors should handle it "perfectly". I see; that sounds good. So perhaps we should be moving in this direction, then. That is, start by making defconst mark the variables (perhaps in the way you've already implemented?), and then make byte-compilation warn about assigning to defconsts (and make describe-function expose the information, as requested). And then, in a later Emacs version, we could start enforcing the constness in running code.