Hacker News new | ask | show | jobs
by noobly 2751 days ago
is there really a naming distinction between ‘>’ and ‘<‘? Is only one really the ‘greater’ than sign? Interesting if so! I always assumed it was context dependent (i.e x < 10 could be said 10 is greater than x, so it’s still acting as a greater than sign - but I see why I’m probably wrong here). I was interested in seeing an arguement like another poster made, where notation be like x = [0,1] might be proposed.
3 comments

If you read

  Pull the lever when x < 0
aloud, you must read it as "Pull the lever when x is less than zero." Thus, "<" is "less than", and ">" is "greater than", for that reason specifically.

Also, Unicode calls it U+003C LESS-THAN SIGN and U+003E GREATER-THAN SIGN.

At least, that's the terms that the article is using, and I think there's sufficient context to identify that, and go along w/ it.

Well, and I don’t mean to be strictly pebdabtic, but you could read it as “when 0 is greater than x”, but of course it takes more overhead and I see why I was wrong. Thanks, it’s getting late today so I’m glad I managed to learn something before the days up.
> is there really a distinction between ‘>’ and ‘<‘? Is only one really the ‘greater’ than sign?

The convention I've always seen is that `>` is "greater than" and `<` is "less than". Reading from left to right `x > 2` is "x is greater than 2" and `2 < x` is "2 is less than x". Functionally the same, yes, but with a distinction in the way the comparison is done (reading left to right). So with a preferred/dominant reading direction I would consider them different. This would be important if reading/describing a line of code to someone where it might be read/written left to right.

I don't know if the names are reversed in languages that are read right to left?

By convention, math is always left to right regardless of the direction of the script it's in, so presumably the operators do the same.
Yes, there absolutely is. Because we write so many languages left-to-right, '>' denotes 'greater than'. Perhaps right-to-left written languages have mathematical comparison operators with opposite names.
By convention, math is always left to right regardless of the direction of the script it's in, so presumably the operators do the same.
Yeah, I was intending to refer to a time prior to the establishment of those conventions. Presumably those societies with right-to-left writing had independent mathematics with comparison operators. If they named them, there might be opposite conventions back then.