[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Real constants
From: |
Stefan Monnier |
Subject: |
Re: Real constants |
Date: |
Fri, 15 Jul 2005 00:24:46 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> - 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
- Re: Real constants, (continued)
- Re: Real constants, Richard M. Stallman, 2005/07/13
- Re: Real constants, Juanma Barranquero, 2005/07/14
- Re: Real constants, Richard M. Stallman, 2005/07/14
- Re: Real constants, Juanma Barranquero, 2005/07/14
- Re: Real constants, Thien-Thi Nguyen, 2005/07/15
- Re: Real constants, Richard M. Stallman, 2005/07/15
- Re: Real constants, Juanma Barranquero, 2005/07/16
- Re: Real constants, Richard M. Stallman, 2005/07/15
- Re: Real constants,
Stefan Monnier <=
- Re: Real constants, Juanma Barranquero, 2005/07/18