But then again, what can you expect from a language that uses "+", the quintessential notation for commutative operations, for the (very non-commutative) operation of concatenation?
Doubly sad when you realize that the language was designed by an actual mathematician.
This is just absolutely not true. It is certainly "min" and "max" for any total order, they definitely don't have to be numbers or even numbers with the usual ordering (as confusing as that would be with a set of numbers but the reverse ordering). "first" and "last"? I've never heard that.
I haven't worked with partial orders so much that I can be as confident about that, perhaps "least" and "greatest" are the correct terms. But "min" and "max" are certainly used sometimes by non-specialists (i.e. professional mathmaticians that don't necessarily spend a lot of time with posets) without any confusion.
This is true, but they do not have exactly the same meaning. On a poset you do not speak of "the min", but of "a min". You still have "the least", which is a different notion.
Is this any worse than using `+` for floating-point addition, which isn't even associative?
Even if it wasn't, floating point numbers are very often regarded as approximations of real numbers, where addition is associative. String concatenation cannot be construed to have any resemblance of commutativity.
'a' < 'b' only by accident of history. It could just as easily have been the reverse.
Tuples have a reasonable natural total order: just compare component wise. And minimum of a list of tuples makes sense.
You could argue that alphabetic ordering is artificial, but it's hard to argue that it ain't well established and non-surprising.
Interestingly, not all numbers have intuitive orders. Eg complex numbers don't really have a good preferred ordering. And the ordering of p-adic numbers is well defined and unique, but really weird.
No they don't. (1, 2) > (2, 1) = ???
To compare tuples you need a generalisation of comparison which includes 'incomparable' as an outcome. See lattices https://en.wikipedia.org/wiki/Lattice_%28order%29
> but it's hard to argue that [alphabetic ordering] ain't well established
it is, agreed...
> and non-surprising
...agreed again, only because it's a convention you know so well (had it been reversed since your birth you'd say exactly the same thing).
I agree with both points but that does not invalidate what I said abour alphabetic ordering being artificial.
I meant that the common ordering on tuples is reasonably natural. Not that it is necessarily the One True Natural Ordering.
About lattices and partial orders: if there's a choice about what to pick as the default ordering for some built-in datatypes for your language and there are multiple reasonable choices, going with the total order seems like a good idea.
To give a counterexample: functions from natural numbers to an orderable set have a well defined, reasonably natural order, just compare them like as if they were a list of elements of the orderable set. But that would be a bad idea in a programming language, and it is indeed better to just treat functions as incomparable by default.
Similarly we could have said b < a is true but then it would always be true and a < b would be false and the world would be exactly the same because this is all a made up convention for the benefit of humans.
Numbers are the underlying conceptual thing.