Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Go 1.24's `omitzero` is another of the best additions to the ecosystem in years (jvt.me)
2 points by jamietanna 7 months ago | hide | past | favorite | 2 comments


I've got a question for the Go people, it's not intended to be adversarial:

What exactly does Go get out of its zero values system? What does the language get from having this ambiguity built in to every type?


No uninitialized values, same as Java. You don’t get junk values that are whatever were in that memory previously. It’s actually a lack of ambiguity in that an int will always be 0 when initialized, not like 19692847376 sometimes.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: