> - 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
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel