From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Real constants
Date: Fri, 15 Jul 2005 00:24:46 -0400 [thread overview]
Message-ID: <87eka0k8k5.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <f7ccd24b05071401162ed4d4b6@mail.gmail.com> (Juanma Barranquero's message of "Thu, 14 Jul 2005 10:16:42 +0200")
> - True constants can prevent some kinds of problems.
That seems to be the only real motivation (the others are more like "why not
have it"?). I must say it's pretty vague. AFAICT in 99.9% of the cases
constants have the following uses:
- catch programming errors. This is similar to type annotations, modules,
etc... and does not enable anything. It's only used for software
engineering purposes.
- allow the compiler to generate more efficient code.
I don't think Richard considers either of them as something
particularly important.
> - At least one developer (Stefan) has said he has true constants
> added to his local Emacs. I'd assume he finds them useful.
I like to experiment with primitives in order to get a better idea of what
the code out there looks like. E.g. my local Emacs's strings are
non-mutable. I.e. I like to try and add some constraint which seems to be
generally not broken, and see if/where it gets broken. This is a general
technique to learn to understand some unknown piece of code.
Of course I also strongly believe in non-mutable objects, so I like the idea
of constants and non-mutable strings, but I know it's a waste of time to try
and include those things in elisp.
Stefan
next prev parent reply other threads:[~2005-07-15 4:24 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eka0k8k5.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=rms@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.