[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
version> and version>=
From: |
goncholden |
Subject: |
version> and version>= |
Date: |
Wed, 02 Feb 2022 14:14:54 +0000 |
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, February 2nd, 2022 at 1:52 PM, Tassilo Horn <tsdh@gnu.org> wrote:
> goncholden goncholden@protonmail.com writes:
>
> > > `emacs-version' is a string, 28.0 is a float. You cannot compare them.
> > > Stefan suggested to use` emacs-major-version' with 28 (both
> > > integers) instead.
> >
> > It would be convenient if there was a function that could handle
> > floats, so that one can condition not just on a major version, but
> > upon the complete version number.
>
> Well, usually there should be no API-breaking changes between Emacs X.Y
> und X.Z, so version-checks more detailed than major version shouldn't be
> needed.
>
> And there is already
>
> (version<= "28.0" emacs-version)
>
> if you want to test with version strings and have more control over
> minor and even micro version. (Using floats for versions is just plain
> wrong.)
>
> Bye,
> Tassilo
You make a good point about the "No API-Breaking Changes". Then perhaps
(>= emacs-version "28.0") if one does not like floats. Although there is
nothing wrong about floats because version numbers can easily be sorted
numerically. In the old days, strings took over. I wish scripts could
handle numeric computations better.
- version> and version>=, goncholden, 2022/02/01
- version> and version>=, goncholden, 2022/02/01
- Re: version> and version>=, Emanuel Berg, 2022/02/01
- Re: version> and version>=, Stefan Monnier, 2022/02/01
- version> and version>=, goncholden, 2022/02/02
- Re: version> and version>=, Tassilo Horn, 2022/02/02
- version> and version>=, goncholden, 2022/02/02
- Re: version> and version>=, Tassilo Horn, 2022/02/02
- version> and version>=,
goncholden <=
- Re: version> and version>=, Tassilo Horn, 2022/02/02
- Re: version> and version>=, Tassilo Horn, 2022/02/02
- version> and version>=, goncholden, 2022/02/02
- Re: version> and version>=, Tassilo Horn, 2022/02/02
- Re: version> and version>=, Eli Zaretskii, 2022/02/02
- Re: version> and version>=, Yuri Khan, 2022/02/02
- Re: version> and version>=, goncholden, 2022/02/02