r/programming • • Aug 25 '26

EVE Online: The Move to Python 3 Begins!

https://www.eveonline.com/news/view/the-move-to-python-3-begins
802 Upvotes

289 comments sorted by

View all comments

Show parent comment

95

u/pikachuyann Aug 25 '26

It's still somehow the canonical way to write "not equal" in postgreSQL (albeit != is accepted (and translated to <> "early in parsing") now)

68

u/Blashtik Aug 25 '26

<> is the ANSI SQL standard. I use it when writing SQL simply because of that. It's not like it's harder to type or understand than != (actually it's slightly easier to type, != requires one shifted keypress and one unshifted, on opposite sides of the keyboard)

44

u/agnas Aug 25 '26

The amazing thing is that I'm absolutely sure you're not joking.

18

u/pm_me_coffee_mugs Aug 25 '26

Nordic QWERTY finally superior (!= requires two shifted keypresses (still on opposite sides of the keyboard))

23

u/output_broadcast Aug 25 '26

It's also how you do it in Excel.

8

u/ShinyHappyREM Aug 25 '26

And in Free Pascal and Delphi.

8

u/Jwosty Aug 25 '26 edited Aug 25 '26

And languages in the ML family (F#, OCaml)

3

u/0x1f606 Aug 25 '26

Thankfully Rust skipped that particular inheritance, not a fan.

7

u/Jwosty Aug 25 '26

Idk, it’s just a different pair of symbols, I hardly register the difference anymore. My brain reads both as the exact same thing lol

1

u/TheToadKing Aug 26 '26

A different pair of symbols that make no sense when you're comparing two things that don't have a sortable order.

5

u/G_Morgan Aug 25 '26

albeit != is accepted (and translated to <> "early in parsing") now

I hope that doesn't mean literal text replacement and actually means lexing "!=" as "NotEqualsToken".

8

u/flanger001 Aug 25 '26

It took my best friend (a DBA) explaining that it means "both less than and greater than" for me to actually understand it. That was January of this year.

12

u/Iamonreddit Aug 25 '26

Less than OR greater than, not both less than AND greater than.

A scalar value can't be less than AND greater than another scalar value.

-10

u/flanger001 Aug 25 '26

No, it's both less than AND greater than. I was correct here.

A scalar value can't be less than AND greater than another scalar value.

Correct, which is why it is the "not equals" operator.

8

u/bellicosebarnacle Aug 25 '26

Hmm, you're confused. a not equal to b means that either a < b OR a > b.

You could also say that a == b means a ≤ b AND a ≥ b. Maybe that's what you're thinking of?

6

u/Brian Aug 25 '26

a not equal to b means that either a < b OR a > b.

Though strictly speaking, this falls down in practice, as there are types that do define equality/inequality, but don't define ordering. Eg. for complex numbers it's not true that 1+i < 2, nor that it's greater, but it's definitely not equal.

1

u/Ameisen Aug 25 '26

Yeah, i and 1 have equal magnitude but not equal values.

Likewise, in C++:

std::is_same_v<char, signed char> == false
std::is_same_v<char, unsigned char> == false
std::is_same_v<signed char, unsigned char> == false

... but

std::is_same_v<int, signed int> == true
std::is_same_v<int, unsigned int> == false
std::is_same_v<signed int, unsigned int> == false

4

u/Iamonreddit Aug 25 '26

Are you just describing the characters used rather than what they mean?

Because sure the <> characters are literally the less than and greater than operators one after the other, but when used in this fashion it functions as less than OR greater than, which is just another way of representing not equal.

2

u/Haplo12345 Aug 29 '26

Are you trying to say any value using <> is a quantum value with two simultaneous states?

1

u/IDontLikeCherryTomat Aug 27 '26 edited Aug 27 '26

Still have to use that in our cypher db, trips me up every once in a while