Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
khazhoux
2y ago
0 comments
Share
The article is about enums, which are lacking in Go.
0 comments
default
newest
oldest
randomdata
2y ago
No, Go definitely has enums. It is sum types (that some people have recently started calling enums) that Go lacks.
grumpyprole
2y ago
Go does not model enums as separate types (like e.g. Pascal), they are essentially just integers like C.
randomdata
2y ago
No, Go enums are definitely separate types. Sure, technically there is also an integer (or some other base representation) hidden in there somewhere, but that's what an enumeration is. Without that you don't have an enum.
1 more reply
j
/
k
navigate · click thread line to collapse