News for hackers. Stuff that matters.
Re:An Honest Review of Go (2025) by jdefr89 on Thursday January 08, 2026 @12:57PM (#46544173)
No its because 99% of the time people use enums to give names to magic constants... That is it. Go went for simplicity and const+iota achieves it just fine. People act like enums make or break software itself or something.
Re:An Honest Review of Go (2025) by weitendorf on Thursday January 08, 2026 @01:07PM (#46544303)
That seems unlikely to me to be the actual explanation. It could very well be what you prefer or how you would do it, but I can definitely assure you that the Go/other infrastructure teams think about these problems and hear plenty of complaints about lack of union type support.
Re:An Honest Review of Go (2025) by jimbokun on Thursday January 08, 2026 @11:37PM (#46550090)
Yea but with a tiny bit more effort they could have ensured that an invalid value is never assigned to an enum, iterate over the values, ensure switch statements handle every case, etc.