Re:Safer Enums in Go
by politician on Saturday May 14, 2022 @12:16PM
(#31379434)
The ‘safe’ keyword in the title is a Siren’s song to certain types of Rustaceans, so it’s not surprising.
[ Parent
| on HN ]
Re:Safer Enums in Go
by tialaramex on Saturday May 14, 2022 @05:39PM
(#31382827)
I was reading this because hey, safer enums. But I agree, Sum types are a must have.
Particularly, decryption should be Authenticated, and so the correct return type of a decrypt function is a Sum type, and if you don't have Sum types you can't do that.