From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: optimizing defconst Date: Mon, 29 Oct 2007 22:14:54 -0400 Message-ID: References: <200710271747.l9RHlQ53020242@oogie-boogie.ics.uci.edu> <200710280228.l9S2Sldn002915@oogie-boogie.ics.uci.edu> <87fxzumc4x.fsf@kfs-lx.testafd.dk> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1193710515 23855 80.91.229.12 (30 Oct 2007 02:15:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2007 02:15:15 +0000 (UTC) Cc: dann@ics.uci.edu, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: storm@cua.dk (Kim F. Storm) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 30 03:15:17 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 1ImgdO-0007b2-9b for ged-emacs-devel@m.gmane.org; Tue, 30 Oct 2007 03:15:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImgdE-0007IA-Lq for ged-emacs-devel@m.gmane.org; Mon, 29 Oct 2007 22:15:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ImgdA-0007Hv-H1 for emacs-devel@gnu.org; Mon, 29 Oct 2007 22:15:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Imgd6-0007Hi-7p for emacs-devel@gnu.org; Mon, 29 Oct 2007 22:14:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Imgd6-0007Hf-1p for emacs-devel@gnu.org; Mon, 29 Oct 2007 22:14:56 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Imgd5-00065u-FD for emacs-devel@gnu.org; Mon, 29 Oct 2007 22:14:55 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1Imgd4-0000Pt-6V; Mon, 29 Oct 2007 22:14:54 -0400 In-reply-to: <87fxzumc4x.fsf@kfs-lx.testafd.dk> (storm@cua.dk) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:82117 Archived-At: What about an option to make a constant read-only, something like (defconst ... :read-only t) It is work which is not necessary. It is better if we save our time for other things. Then the byte-compiler could check to see if a constant (or any variable for that matter) is really read-only and optimize it away. It is a clean way to do this job, but this job does not need to be done at all.