emacs-devel
[Top][All Lists]
Advanced

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

Re: constant `e'


From: Juanma Barranquero
Subject: Re: constant `e'
Date: Fri, 9 Feb 2007 10:32:09 +0100

On 2/9/07, Drew Adams <address@hidden> wrote:

Obviously, renaming `e' now would break existing code, but if others agreed,
then we might plan to deprecate `e' over time, in favor of a longer name.

I think that would be a good idea, if anything because the risk of
shadowing `e' with a local (unrelated) binding is quite high, and that
could be a difficult bug to spot.

 ;; Careful when editing this file ... typos here will be hard to spot.
 ;; (defconst pi       3.14159265358979323846264338327
 ;;  "The value of Pi (3.14159265358979323846264338327...)")

Perhaps that comment dated from some time (?) pre-Emacs 20 when `pi' was
defined using explicit decimal notation

That's the only reasonable explanation. These comments should be deleted.

Undefining it and seeing what happens would be one approach... Obviously not
something to attempt before the release, in any case. ;-)

No :)

I find very curious this change by Stefan:

;; It's too inconvenient to make `e' a constant because it's used as
;; a temporary variable all the time.
(defvar e (exp 1) "The value of e (2.7182818...).")

But

 (let ((pi 3.2)) pi) => 3.2

so there's no problem with constants and temporary variables. I think
that must be related to some local patches he mentioned a while ago
for allowing real constants...

Am I right, Stefan, or did I misunderstand this comment in the code?

                   /L/e/k/t/u




reply via email to

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