On Mon, Sep 4, 2023, 8:30 PM Richard Stallman <
rms@gnu.org> wrote:
[[[ 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. ]]]
> How about making the byte compiler recognize the construct
> (if (< emacs-major-version NUMBER) ...)
> and do this optimization on it?
People seem not to have considered this seriously, but I have not seen
any serious discussion of a drawback. What flaw or drawback do people
see in it? It should optimize the existing the existing code with no
change at all. Isn't that just perfect?
Since byte-compiled files are not versioned, emacs-major-version is not really a constant, so constant-folding isn't correct.
For example, loading a file in version 29 that was byte-compiled by version 28 (or earlier) may not be the same as byte-compiling the file with version 29.
Lynn