Go 1.24's `omitzero` is another of the best additions to the ecosystem in years (jvt.me) 2 points by jamietanna 1y ago ↗ HN
[–] jbreckmckye 1y ago ↗ 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? [–] FreezerburnV 1y ago ↗ 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.
[–] FreezerburnV 1y ago ↗ 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.
3 comments
[ 0.19 ms ] story [ 18.6 ms ] threadWhat exactly does Go get out of its zero values system? What does the language get from having this ambiguity built in to every type?