Anthony Accioly on Nostr: GA folks. For the gophers out there... Just a reminder: a bunch of consts + iota ...
GA folks.
For the gophers out there... Just a reminder: a bunch of consts + iota isn't an enum. Slugs aren’t enums. Interfaces, structs, and switch statements aren’t enums either.
Enums are enums.
Scala went through the same BS for what felt like a gazillion years. At least in Scala we had sealed types and case objects, but yep, they weren’t enums either. Just add a proper enum to the language. Go really needs a proper sum type. Don’t wait until Go v3 like we did in Scala land to introduce a basic construct like this. "Simplicity" here is creating extraordinary levels of complexity.
#gm #enums #golang #scala #languageDesign
Published at
2025-06-12 11:52:30Event JSON
{
"id": "95fe5d1bd76f45d3c385dd609c4d845b36ab78e9d9b72a389703c659dd11417c",
"pubkey": "ee9d979e7e1418a9f7472baf82dc96082a0d4251b77bcb170a6ecec93fadff64",
"created_at": 1749729150,
"kind": 1,
"tags": [
[
"t",
"gm"
],
[
"t",
"enums"
],
[
"t",
"golang"
],
[
"t",
"scala"
],
[
"t",
"languageDesign"
],
[
"t",
"languagedesign"
]
],
"content": "GA folks.\n\nFor the gophers out there... Just a reminder: a bunch of consts + iota isn't an enum. Slugs aren’t enums. Interfaces, structs, and switch statements aren’t enums either.\n\nEnums are enums.\n\nScala went through the same BS for what felt like a gazillion years. At least in Scala we had sealed types and case objects, but yep, they weren’t enums either. Just add a proper enum to the language. Go really needs a proper sum type. Don’t wait until Go v3 like we did in Scala land to introduce a basic construct like this. \"Simplicity\" here is creating extraordinary levels of complexity.\n\n#gm #enums #golang #scala #languageDesign",
"sig": "39494fc4bd85f73cb12f38919bc8c36109944f43885bde199e31a6ffee897f1e169806960195567416f2a697889bf5c71c056fea6b8ccfc7fc3520109bc2f79c"
}