bugsmithA to Golang · 1 year agoGo Enums Still Suckwww.zarl.devexternal-linkmessage-square13linkfedilinkarrow-up123arrow-down13
arrow-up120arrow-down1external-linkGo Enums Still Suckwww.zarl.devbugsmithA to Golang · 1 year agomessage-square13linkfedilink
minus-squareSolemarc@lemmy.worldlinkfedilinkarrow-up2·1 year agoAs far as I was aware Go didn’t have enums and this const() Pattern is just a weird thing people do because it behaves like an enum?
minus-squareEthanlinkfedilinkEnglisharrow-up4·1 year agoYou are correct, Go doesn’t have enums. The const thing is a widely accepted pattern for approximating enums.
As far as I was aware Go didn’t have enums and this
const()
Pattern is just a weird thing people do because it behaves like an enum?
You are correct, Go doesn’t have enums. The const thing is a widely accepted pattern for approximating enums.