(2016)
The versioning and slice sorting have since been solved, by go.mod and sort.Slice respectively.
The problem with "Make it an error to not initialise a struct field" is you lose source compatibility when adding new struct fields.
The versioning and slice sorting have since been solved, by go.mod and sort.Slice respectively.
The problem with "Make it an error to not initialise a struct field" is you lose source compatibility when adding new struct fields.
If you allow the struct definition to specify a default value then the struct author can set default in the cases where there is a sensible default, and leave it compile-time incompatible in the cases where there really is no good default and the person doing the upgrade needs to make a decision.
I thought Go didn't allow functions with default argument values either?
Was he being ironic, or serious? Love to hear more.