this post was submitted on 15 Nov 2024
223 points (93.4% liked)

Programmer Humor

32476 readers
587 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 13 hours ago (1 children)

Isn't it obvious? More code to skim, scroll over and maintain if something changes. If you add a struct field, your manual EQ implementation still compiles and seems to work but is wrong and will lead to bugs. Yes, solving this for 99,999% of cases with an attribute is just far superior and does make a difference (while keeping it easy to manually implement it if needed). Hash and Ord and some other traits can be implemented in a similar fashion btw..

[โ€“] [email protected] 1 points 4 hours ago

I said it was better, just not much better.

The maintenance costs of equals is nearly zero. Scrolling over boilerplate seems like a real stretch, like saying a novel with a picture every chapter is harder to read.

I like that you can't accidentally forget to update it, which is kinda nice but is rarely a concern.
And it's a bit more readable, which is nice.
It's better, but folks are talking like it's Super Jesus and I think it's more like finding a dollar in the parking lot.