Harendra@programming.dev to Learn Programming@programming.devEnglish · 2 months agoWhy Go Interfaces Are the Remarkable Secret to Clean Code Masteryblog.devgenius.ioexternal-linkmessage-square2fedilinkarrow-up15arrow-down18
arrow-up1-3arrow-down1external-linkWhy Go Interfaces Are the Remarkable Secret to Clean Code Masteryblog.devgenius.ioHarendra@programming.dev to Learn Programming@programming.devEnglish · 2 months agomessage-square2fedilink
minus-squareorclev@lemmy.worldlinkfedilinkarrow-up2·2 months agoBasically because Go’s type system is garbage and interfaces are the one hammer it gives you for solving all problems. They’re literally the only way to do polymorphism in Go.
Basically because Go’s type system is garbage and interfaces are the one hammer it gives you for solving all problems. They’re literally the only way to do polymorphism in Go.