Harendra@programming.dev to Learn Programming@programming.devEnglish · 2 years agoWhy Go Interfaces Are the Remarkable Secret to Clean Code Masteryblog.devgenius.ioexternal-linkmessage-square2linkfedilinkarrow-up15arrow-down19
arrow-up1-4arrow-down1external-linkWhy Go Interfaces Are the Remarkable Secret to Clean Code Masteryblog.devgenius.ioHarendra@programming.dev to Learn Programming@programming.devEnglish · 2 years agomessage-square2linkfedilink
minus-squarenous@programming.devlinkfedilinkEnglisharrow-up3·2 years agoSo, why are go interfaces anything to do with clean code? The article never mentions this at all only goes over interfaces in a basic way…
minus-squareorclev@lemmy.worldlinkfedilinkarrow-up2·2 years 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.
So, why are go interfaces anything to do with clean code? The article never mentions this at all only goes over interfaces in a basic way…
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.