From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: byte compiling defcustom Date: Mon, 19 Nov 2007 14:44:39 -0600 (CST) Message-ID: <200711192044.lAJKidLh003491@jane.dms.auburn.edu> References: <200711171647.lAHGlHqH024027@jane.dms.auburn.edu> <200711172032.lAHKWhgx025030@jane.dms.auburn.edu> <200711172041.lAHKf2SG025058@jane.dms.auburn.edu> <200711180413.lAI4DLF8025958@jane.dms.auburn.edu> <200711181841.lAIIfDB2028254@jane.dms.auburn.edu> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1195505213 21333 80.91.229.12 (19 Nov 2007 20:46:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2007 20:46:53 +0000 (UTC) Cc: dann@ics.uci.edu, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 19 21:46:58 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 1IuDWD-0004PQ-J5 for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2007 21:46:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuDW0-0003zv-3T for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2007 15:46:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IuDVx-0003xi-3I for emacs-devel@gnu.org; Mon, 19 Nov 2007 15:46:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IuDVv-0003ts-06 for emacs-devel@gnu.org; Mon, 19 Nov 2007 15:46:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuDVu-0003tf-RS for emacs-devel@gnu.org; Mon, 19 Nov 2007 15:46:38 -0500 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1IuDVo-0006xk-TW; Mon, 19 Nov 2007 15:46:33 -0500 Original-Received: from jane.dms.auburn.edu (jane.dms.auburn.edu [131.204.53.201]) by manatee.dms.auburn.edu (8.13.7+Sun/8.13.7) with ESMTP id lAJKkVEp001947; Mon, 19 Nov 2007 14:46:31 -0600 (CST) Original-Received: from jane.dms.auburn.edu (localhost [127.0.0.1]) by jane.dms.auburn.edu (8.13.4+Sun/8.13.4) with ESMTP id lAJKielt003494; Mon, 19 Nov 2007 14:44:40 -0600 (CST) Original-Received: (from teirllm@localhost) by jane.dms.auburn.edu (8.13.4+Sun/8.13.3/Submit) id lAJKidLh003491; Mon, 19 Nov 2007 14:44:39 -0600 (CST) X-Authentication-Warning: jane.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f In-reply-to: (message from Richard Stallman on Mon, 19 Nov 2007 14:03:03 -0500) X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) 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:83690 Archived-At: I don't see any major flaws with that, but I think it is cleaner to show the expression precisely as it was in the source code. Indeed. If the byte compiler would change the Lisp code in a way that represents an improvement, then the Lisp code in the source should be changed. Moreover, this would represent much added complexity and risk for negligible benefit. Due to various keywords, defcustoms are way more complex than defvars. Their value is not necessarily evaluated in the context of the file (e.g `custom-initialize-safe-set') and the :initialize or :set function could even not evaluate it at all, or evaluate it in a non-standard way. So the potential for bugs in the automatic optimization would be very non-trivial. It seems clear that in terms of actual optimization,any gains would be neglegible and the main reason to compile would be to emit warnings. To me, no change seems necessary, but if the lack of warnings worries people, can the compiler not just warn about, say, obsolete variables and such without _changing_ anything about the code, leaving this up to the author or maintainer. Sincerely, Luc.