[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Real constants

From: Juanma Barranquero
Subject: Re: Real constants
Date: Fri, 15 Jul 2005 02:53:00 +0200

On 7/15/05, Richard M. Stallman <address@hidden> wrote:

> These were useful in specific ways.  Are user-defined constants
> useful in specific ways?

Aren't user-defined constants useful in other languages? Isn't it
useful per se to be able to set a symbol and guarantee that the user,
or another module, is not going to change it by accident? Certainly
Common Lisp is not above having constants
(http://www.lisp.org/HyperSpec/Body/mac_defconstant.html), and at
least some implementations treat them as true constants:

  ;;; An error occurred in function COMPILE-FORM:
  ;;; Error: The symbol *Z* has been declared constant, and may not be
assigned to

What do you ask for? An example? What if the constants define absolute
sizes of external resources (like, for example,
`bindat--fixed-length-alist') and every single attempt to change them
could be considered an error (and possibly crash Emacs)?

> No motive was mentioned for adding a primitive to set the flag except
> that the flag exists.  That's "completeness' sake".

No, that's "I assumed the value of real constants in programming
languages was way beyond needing a rationale"... Perhaps I'm assuming
too much.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]