From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: should fset 'symbol get an undefined function warning? Date: Tue, 30 Oct 2007 20:55:03 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193792123 18368 80.91.229.12 (31 Oct 2007 00:55:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Oct 2007 00:55:23 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 31 01:55:24 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1In1rg-0004eZ-3I for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2007 01:55:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1In1rW-0008QG-CQ for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2007 20:55:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1In1rR-0008OF-NI for emacs-devel@gnu.org; Tue, 30 Oct 2007 20:55:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1In1rN-0008LU-Mu for emacs-devel@gnu.org; Tue, 30 Oct 2007 20:55:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1In1rN-0008L5-GU for emacs-devel@gnu.org; Tue, 30 Oct 2007 20:55:05 -0400 Original-Received: from tomts20.bellnexxia.net ([209.226.175.74] helo=tomts20-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1In1rM-0006fF-Ri for emacs-devel@gnu.org; Tue, 30 Oct 2007 20:55:05 -0400 Original-Received: from pastel.home ([74.12.208.145]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071031005504.XMEX8273.tomts20-srv.bellnexxia.net@pastel.home> for ; Tue, 30 Oct 2007 20:55:04 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id ABE138176; Tue, 30 Oct 2007 20:55:03 -0400 (EDT) In-Reply-To: (Drew Adams's message of "Tue\, 30 Oct 2007 15\:39\:58 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82181 Archived-At: >> > `defalias' might be better to use in this context, but it >> > should still be good to not issue that warning for `fset'. >> > (I'm not saying anyone has disagreed with that.) >> >> I disagree: `fset' is meant to *change* the function-slot >> of a symbol, not to initialize it. So it's use shouldn't be treated by >> the byte-compiler as a declaration. Insted, the byute-compiler should >> complain about the use of `fset' on an unknown function similarly to the >> use of `set(q)' on an unknown variable. > Good point. I'm convinced. > Was there an opposing consideration that led you to say "Could be" at first, > or was that before this point occurred to you? No. My area of expertise is functional programming where there's a *very* clear difference between changing the value of a variable and initializing that variable (e.g. in SML and Haskell you simply can't do the equivalent of `setq' or `fset'). Stefan