312
I love Rust (lemmy.blahaj.zone)
submitted 1 month ago by rustyfemboy to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] expr@programming.dev 9 points 1 month ago

Don't need the Ord instance for equality, just Eq is sufficient. Ord is for inequalities.

The point of the post is that most mainstream languages don't provide a way to automatically derive point-wise equality by value, even though it's pervasively used everywhere. They instead need IDEs to generate the boilerplate rather than the compiler handling it.

this post was submitted on 15 Nov 2024
312 points (100.0% liked)

Programmer Humor

32715 readers
608 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS