guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can we make the *-version functions more consistent?


From: Rob Browning
Subject: Can we make the *-version functions more consistent?
Date: 14 May 2001 16:22:35 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Right now we have (major-version) and (minor-version), and in the case
of a version like 1.3.4, minor-version returns "3.4".

Now that we're switching to a fixed "three number" versioning scheme,
could we change it so that we have:

  (major-version) => "1"
  (minor-version) => "6"
  (revision)      => "0"

or perhaps "revision-version", though that sounds a little funny.
(Actually Christian Stimming pointed out that Guppi uses
"micro-version" so maybe that would be appropriate.)

This would make it much easier to use these numbers in ways that
reflect their semantics (and frankly, these days, they could just be
integers rather than strings):

  (let ((major (string->number (major-version)))
        (minor (string->number (minor-version)))        
        (micro (string->number (micro-version)))        
    (cond
      ((and (<= major 1) (= minor 3) (< micro 2))
       (do-something-for-pre-1.3.2))
      ((or (= major 1) (or (= minor 3) (= minor 4)))
       (do-something-for-1.3.2->1.4.X))
      (else
       (do-something-for-newer-versions)))))

Of course this would only work for newer versions, but it would be
nice going forward.

-- 
Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930



reply via email to

[Prev in Thread] Current Thread [Next in Thread]