18
Go Enums Still Suck (www.zarl.dev)
submitted 6 months ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 2 points 6 months ago

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?

[-] [email protected] 4 points 6 months ago

You are correct, Go doesn’t have enums. The const thing is a widely accepted pattern for approximating enums.

this post was submitted on 20 Mar 2024
18 points (87.5% liked)

Golang

2163 readers
3 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 1 year ago
MODERATORS