3 ms·
> 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.
by Kamq 3y ago
> 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...