Bayley, Alistair wrote:
From: Simon Marlow [mailto:[EMAIL PROTECTED]
The lexicographical ordering would make 10.0 > 9.3. In
general, A.B > C.D
iff A > C or A == C && B > D. When we say the "latest"
version we mean
"greatest", implying that version numbers increase with time.
Does that help?
Sort of. It's what I'd expect from a sensible version comparison. It's
just not something I'd ever choose to call lexicographic ordering. IMO,
lexicographgic ordering is a basic string comparision so e.g.
max "10.0" "9.3" = "9.3"
I'd call what you're doing numeric ordering. Does it have a better name,
like version-number-ordering, or section-number-ordering (e.g. Section
3.2.5, Section 3.2.6)?
I've heard it called lexicographical ordering before, but I'm happy to call
it by whatever name induces the least confusion!
Cheers,
Simon
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe