On Thu, 30 Oct 2025 14:18:43 +0100 "Felix Winkelmann" 
<[email protected]> wrote:

> Please find attached a slightly revised patch for the mentioned
> functionality. I made the following changes:
>
> - I moved the "version>=?" procedure into extra.scm, to make
>   this all a bit more lightweight, we don't really need another
>   library unit for this.
> - I removed "version<?", it can be trivially derived by the
>   user, if required.

Ok.  As I mentioned, I only added version<? because 1. it was trivial
and 2. I was under the impression that we would implement a more
complete set of version comparators.  After some discussion on IRC, we
agreed that we should not do that and only expose what the core already
has and needs (version>=?).

> - I added "/" as a separator character and changed the implementation
>   to use numeric comparison if the initial arguments are numeric or
>   are convertible to numbers.

I'm not sure making version>=? accept numbers is a good idea,
particularly in cases where floats are used to represent versions.

Example of problem: release version 1.0, then 1.1, 1.2... 1.9 and then
finally 1.10, which is read as 1.1, thus less than 1.9.  I remember we
had problems like that with egg versions in the past.

Nowadays chicken-install in C6 rejects numbers to specify versions in
.egg files [0].  I believe version>=? should do the same to prevent
confusion.  In cases where versions are really supposed to be compared
as numbers, people can always use regular numeric operators.

[0] 
https://code.call-cc.org/githtml/chicken-core/master/commits/1fae1f20a9d3f69f0ac536e7b11f164a056c0d72.html

All the best.
Mario
-- 
https://parenteses.org/mario

Reply via email to