News for hackers. Stuff that matters.
Re:Go is not an easy language by kaoD on Monday February 22, 2021 @08:48AM (#26224437)
Thanks for the write up effort.

On the first approach, with "error prone" you mean the tag could be incorrect, right? (or even have an impossible variant with 0 or multiple variants set).

Re:Go is not an easy language by simiones on Monday February 22, 2021 @09:30AM (#26224920)
Yup. Also, there is no exhaustiveness checking (the constants we chose to define for SumChoice(0) and SumChoice(1) mean nothing to the compiler anyway - exhaustiveness checking would have you test any possible int, since SumChoice is simply an alias for int).