unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Real constants
Date: Thu, 14 Jul 2005 10:05:27 +0200	[thread overview]
Message-ID: <f7ccd24b0507140105bdf79ca@mail.gmail.com> (raw)
In-Reply-To: <877jfum8rb.fsf-monnier+emacs@gnu.org>

On 7/14/05, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> There's no released Emacs with defvaralias, so it's still recent.

That is true, but seems a joke... :)

> No.  But I could make `defvar' un-const a defconst if that's necessary.

Aha.

> These are hard-read-only so they can't be redefined with defconst
> or un-const'd.

OK.

>   Removing the defvars and replacing the setq with defconst is correct, but
>   the byte-compiler is a bit dumb and don't realize that foo and bar are
>   both unconditionally defined, so it may warn of unknown variables.

In this case you should `defvar' them (to make them known to the
byte-compiler), and then `defconst' them to make unmodifiable. If
there were ever to exist true constants in Emacs (which I see Richard
is vetoing), the ability to switch the constness state would be
necessary.

> - name clashes.  E.g.

The only answer to this would be to make sure constants have
significant, hard-to-repeat-by-accident names. Instead of `e', that
should be `number-e' or `*number-e*' or `transcendent-constant-e' or
whatever.

> I doubt it'll ever make its way into Emacs:

That seems correct.

Thanks,

                    /L/e/k/t/u

  reply	other threads:[~2005-07-14  8:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13 13:59 Real constants Juanma Barranquero
2005-07-13 18:14 ` Stefan Monnier
2005-07-13 18:29   ` Juanma Barranquero
2005-07-14  2:25     ` Stefan Monnier
2005-07-14  8:05       ` Juanma Barranquero [this message]
2005-07-14  3:14     ` Richard M. Stallman
2005-07-14  8:16       ` Juanma Barranquero
2005-07-15  0:12         ` Richard M. Stallman
2005-07-15  0:53           ` Juanma Barranquero
2005-07-15  9:47             ` Thien-Thi Nguyen
2005-07-15 22:03               ` Richard M. Stallman
2005-07-16 10:10                 ` Juanma Barranquero
2005-07-15 18:10             ` Richard M. Stallman
2005-07-15  4:24         ` Stefan Monnier
2005-07-18  6:05           ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7ccd24b0507140105bdf79ca@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).