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#73886: 29.4; Confusing info about void function cells in Emacs Lisp manual Date: Sun, 20 Oct 2024 12:56:03 -0400 Message-ID: References: <86ldykj8a4.fsf@gnu.org> <86frorjqs5.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="16494"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: ulm@gentoo.org, 73886@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 20 18:57:05 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 1t2ZEm-00047E-C7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Oct 2024 18:57:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2ZEM-0002bo-3W; Sun, 20 Oct 2024 12:56:38 -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 1t2ZEL-0002bg-F5 for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 12:56:37 -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 1t2ZEK-0002Z7-HZ for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 12:56:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=kqessrL4P98FGPfcfJnPqKiSbUNDNvYaNr+NvINpURQ=; b=RlEEIh1wN0G8uMc9WhAR6XECxV1FfDmI7kRE9rzAWI3tPzEQHTcdUQLNoXLFIXaBpljLmnaawv/EEtOO0D+fHURwlADcKcoTW8YFv613G0gDsgBsMdPejNcrkkLUhVeZUUhCnU0iILt4Q8U2yLjxuPSScUUUvojg30B+tRamG8bqrcPOg41P68Xk1EJGEGGY0D6POcKbvFyGQweMXqCDNNuUO5zTBwoxfjOERN21cOSZSpIHcKkGY8vV85lo93ONmA4DEP4XJ9o+Q3saIac9vporqmngEjEy27arYFjJM2tTdCIxO+CV8hOFauvI5r0xYRn74qv55T9y75U95iJEKA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2ZEj-0001jW-Pg for bug-gnu-emacs@gnu.org; Sun, 20 Oct 2024 12:57: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, 20 Oct 2024 16:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73886 X-GNU-PR-Package: emacs Original-Received: via spool by 73886-submit@debbugs.gnu.org id=B73886.17294434006629 (code B ref 73886); Sun, 20 Oct 2024 16:57:01 +0000 Original-Received: (at 73886) by debbugs.gnu.org; 20 Oct 2024 16:56:40 +0000 Original-Received: from localhost ([127.0.0.1]:48313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2ZEO-0001iq-A2 for submit@debbugs.gnu.org; Sun, 20 Oct 2024 12:56:40 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:43237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2ZEL-0001iY-BT for 73886@debbugs.gnu.org; Sun, 20 Oct 2024 12:56:37 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1BB488093F; Sun, 20 Oct 2024 12:56:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1729443365; bh=a5R6SKuv7dhGJUDvsgtV6bwSK0EYeeArT0D+ImSIoLA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QD/tSh/FPOXDIpN107Ht+Xch4DelgNhmVNjRpR37rMzn0EPUBlotxrULUSPpB7KHY wSaOgPEvJaJGxUdJ33Q8jiuXhBY2Nje8IjM4ILypGy+Ft3ifkSj5jb6AnKjn2sCi5E yoMn8dSaYQlAOKpc7WQQpJLiP5FKHXW+7ep8Pil7ACe5JSTI3Oams/nRQom7uMF0ys ibM0D29TcsKVK0CnYNAwVBS4paougfs8JNLg0Itna40hKmCEquEfhAbiruCqnZMVIq 1E3CI5UMAXWCxhX6DInFWjGXuo+ELImKSAH9y8Uns0YzEL5QEil6BY5vgQbK11iz/e cl+0J/j01TYJw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2901B803A3; Sun, 20 Oct 2024 12:56:05 -0400 (EDT) Original-Received: from pastel (69-196-161-60.dsl.teksavvy.com [69.196.161.60]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EF4E31200E4; Sun, 20 Oct 2024 12:56:04 -0400 (EDT) In-Reply-To: <86frorjqs5.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 20 Oct 2024 08:18:34 +0300") 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:293988 Archived-At: >> Oops. Looks like I missed this part when I changed it back around >> Emacs-24.4: >> >> ** In 'symbol-function', nil and "unbound" are indistinguishable. >> 'symbol-function' does not signal a 'void-function' error any more. >> To determine if a symbol's function definition is void, use 'fboundp'. > > Could you explain the rationale for that change? I tried to look for > relevant discussions around that date, but came up empty-handed. I can't remember discussing it, no. It was a kind of "executive decision". Having a special "void" (`Qundefined`) non-value for the `symbol-value` is needed for `boundp` since variables can contain *any* value, but not for the `symbol-function` part where we can use any normal value (I chose `nil`) to play this role as long as it doesn't collide with values normally held in the `symbol-function` slot, like function names, function values, cons cells, vectors, ... The upside was a simplification in various chunks of code which used to do things like `(and (fboundp SYM) (symbol-function SYM))` which can now be simplified to `(symbol-function SYM)`. I remember two "motivators", i.e. places where the need to pay attention to the special void case annoyed me enough to look into this and make the change, one was `nadvice.el` and the other was `cl-letf`. [ So, it was no accident that the change happened in the same release as the addition of `nadvice.el`. ] In both cases the issue is that we want to deal with "places" (generalized variables) and that abstraction works well for those places which *always* contain a value, but not as well for those special places that can be "unbound", so removing the "unbound" case from `symbol-function` resulted in a welcome simplification. For the same reason I dislike EIEIO's notion of `slot-boundp` and have already considered marking it obsolete. Stefan