bugsmithA to Golang • 3 months agoGo Enums Still Suckwww.zarl.devmessage-square13arrow-up122arrow-down13
arrow-up119arrow-down1external-linkGo Enums Still Suckwww.zarl.devbugsmithA to Golang • 3 months agomessage-square13
minus-square@[email protected]linkfedilink2•3 months 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-squareEthanlinkEnglish4•3 months 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.