News for hackers. Stuff that matters.
Re:Go Enums Still Suck by zarldev on Thursday March 28, 2024 @08:01AM (#39850136)
the values are specified in the definition of the iota type.

``` type planet int // Gravity[float64],RadiusKm[float64],MassKg[float64],OrbitKm[float64],OrbitDays[float64],SurfacePressureBars[float64],Moons[int],Rings[bool] ```

Re:Go Enums Still Suck by sethammons on Thursday March 28, 2024 @08:03AM (#39850151)
yeah, and now, mentally count how many values you are in, don't lose count now! Why offload that to your brain where you could miscount instead of using structured data?
Re:Go Enums Still Suck by rat9988 on Thursday March 28, 2024 @08:11AM (#39850233)
Because your whole argument is misconstructed. There are cases where longer code is better, but there are many cases where longer is worse too. Because the tools the language provide, on top of being more succint, make the intent more obvious.