Hacker News new | past | comments | ask | show | jobs | submit login

Typically you would use "least" and "greatest" (for a partial order) or "first" and "last" (for a total order). It sounds very strange to talk about "min" and "max" for strings, for example. Do you call the first word on a dictionary the minimal word?

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.




> Typically you would use "least" and "greatest" (for a partial order) or "first" and "last" (for a total order).

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.


I was trained as a mathematician and I can confirm that min and max (for minimal and maximal, or minimum and maximum) are mathematically accurate terms. See https://en.wikipedia.org/wiki/Maximal_and_minimal_elements


> I can confirm that min and max (for minimal and maximal, or minimum and maximum) are mathematically accurate terms.

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.


Which is why I said "min makes sense for any set with a total order. Sometimes partial order too." There's no ambiguity for total order whatsoever.


> what can you expect from a language that uses "+", the quintessential notation for commutative operations, for the (very non-commutative) operation of concatenation?

Is this any worse than using `+` for floating-point addition, which isn't even associative?


But floating point addition is commutative!

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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: