Rusty 🦀 Femboy 🏳️🌈@lemmy.blahaj.zone to Programmer Humor@lemmy.mlEnglish · 16 hours agoI love Rustlemmy.blahaj.zoneimagemessage-square47fedilinkarrow-up1210arrow-down114
arrow-up1196arrow-down1imageI love Rustlemmy.blahaj.zoneRusty 🦀 Femboy 🏳️🌈@lemmy.blahaj.zone to Programmer Humor@lemmy.mlEnglish · 16 hours agomessage-square47fedilink
minus-squareakkajdh999@programming.devlinkfedilinkarrow-up14·9 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)