News for hackers. Stuff that matters.
Re:Practical nil panic detection for Go by Kamq on Sunday November 19, 2023 @09:44AM (#38333062)
I take it you use enums fairly regularly?

I don't really use them that much, so they're superfluous for the most part. Sort of like a car having a bowling alley. I mean, I'll take them if it doesn't complicate the language or impact compile time, but if they're doing to do either of those, I'd rather just leave them.

Adding default branches into the couple of switch statements and a couple spots for custom json parsing that return errors for values outside the set doesn't seem like a bad tradeoff.

There are no comments on this comment yet.