Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'll try to explain why I strongly disagree with the FAQ:

> this is easier to type (no parenthesis) and more readable

When 99% of the open-source codebase uses "<=" as lesser-than-equal, no it is not more readable to change that.

> It has the shape of a left arrow

Then, why not `child >> tree` ? or `tree << child`

> it looks like an augmented assignment because of the equal sign

No, it looks like a comparison. This is totally subjective.

> it can't be confused with "lesser or equal" because [...] would be a no-op

Wrong, the value of _ variable contains the result of the last expression. What value can i expect here?

> we are so used to interpret the 2 signs < and = as "lesser or equal" that we forget that they are a convention for programming languages

I agree, and trying to be subversive won't change that convention.

> in Python, <= is used as an operator for sets with a different meaning

The implementation is different, but the math are the same. The "<", "<=", "==", "!=", ">=", ">" operators are comparison operators.

"setA < setB" has the same meaning as "numberA < numberB", aka: a comparison between two object in an ordered space.

> the sign < is often used in computer science to mean something else than "lesser than", [...], << means left shift; in HTML tags are enclosed with < and >

You are talking about a character not an operator.

> Python uses the same operator % for very different operations: modulo and string formatting

This PEP ( https://www.python.org/dev/peps/pep-0292/ ) tries to replace % as an operator, because it should not be used for string formatting.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: