News for hackers. Stuff that matters.
Re:Practical nil panic detection for Go by the_gipsy on Sunday November 19, 2023 @11:18AM (#38334046)
There are still people that swear that they can brake better than ABS. Until they do a side-by-side test.

Re: custom UnmarshalJson implementation - you still have to remember, and do it for every serialized format (e.g. sql).

A default case in a switch only solves, well, switching. If a rogue value comes in, it will go out somewhere. E.g. json to sql or whatever things are moving.

Re:Practical nil panic detection for Go by Kamq on Sunday November 19, 2023 @06:58PM (#38340057)
> A default case in a switch only solves, well, switching. If a rogue value comes in, it will go out somewhere. E.g. json to sql or whatever things are moving.

I mean, yeah, but eventually you have to do something with it. And the only useful thing you can really do with an enum is switch on it...