145
Accidental shitpost (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] Gremour@lemmy.world 4 points 5 days ago* (last edited 5 days ago)

In Go you can compare structure instances with == (by value). You can also compare pointers (in which case they can be different even if values are equal). You get what you ask for.

Also, I've never needed "Equals" method in Go.

[-] LodeMike@lemmy.today 5 points 5 days ago

I think you can also == two structs in Java, but not classes.

this post was submitted on 20 Oct 2025
145 points (100.0% liked)

Programmer Humor

27048 readers
328 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS