[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emac
From: |
Richard Stallman |
Subject: |
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp? |
Date: |
Sun, 03 Sep 2023 21:34:08 -0400 |
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > > > (defadvice .....))
> > > However, when evaluating the containing defun/defmacro rather than
byte
> > > compiling it, the irritating warning message will appear with the
e-w-c
> > > strategem, but not with hash-if. ;-)
> > How about making the byte compiler recognize the construct
> > (if (< emacs-major-version NUMBER) ...)
> > and do this optimization on it?
> > I think that will DTRT when compiled and when interpreted,
> > and it won't require changes in the code of the programs that use it.
People peopose to handle conditions about Emacs version numbers in
a more optimized way. I propsed a simple syntax for that.
Isn't it better>
> The conditions we want to test are sometimes/frequently expressed in
> terms of the (non-)existence of variables, etc. It would be
> inconvenient for package maintainers to have to determine "critical"
> Emacs version numbers to use.
I don't dollow you, Haveb't we been talking about conditions on Emacs
versions all along in this discussion? I did not propose that as a
change, I carried it along.
> Why do you think a more restricted test of the version number would be
> better than a more general test?
If people would like other tests too, I have nothing against them.
The issue is how to implement whatever tests we support. If they can
be done at compiler time, isn't this the better implementation?
I guess I don't follow. Why do you prefer `hash-if' rather
than this simple compile-time syntax? Why change the syntax rather
than using the syntax we use now?
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
- Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, (continued)
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Philip Kaludercic, 2023/09/02
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Stefan Monnier, 2023/09/02
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Stefan Monnier, 2023/09/02
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?,
Richard Stallman <=
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Richard Stallman, 2023/09/05
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Andreas Schwab, 2023/09/06
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Alan Mackenzie, 2023/09/06
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Alan Mackenzie, 2023/09/06
Re: Why shouldn't we have a #if .... #else .... #endif construct in Emacs Lisp?, Richard Stallman, 2023/09/08