Rusty 🦀 Femboy 🏳️🌈@lemmy.blahaj.zone to Programmer Humor@lemmy.mlEnglish · 1 day agoI love Rustlemmy.blahaj.zoneexternal-linkmessage-square55fedilinkarrow-up1249arrow-down118
arrow-up1231arrow-down1external-linkI love Rustlemmy.blahaj.zoneRusty 🦀 Femboy 🏳️🌈@lemmy.blahaj.zone to Programmer Humor@lemmy.mlEnglish · 1 day agomessage-square55fedilink
minus-squareakkajdh999@programming.devlinkfedilinkarrow-up17·20 hours agoIn Go “==” operator works for everything by default, I like it more: type A struct { Name string Quality int } func main() { var x A var y A fmt.Printf("%v", x == y) } (if all you want is to compare all corresponding fields which you usually want)
In Go “==” operator works for everything by default, I like it more:
type A struct { Name string Quality int } func main() { var x A var y A fmt.Printf("%v", x == y) }
(if all you want is to compare all corresponding fields which you usually want)