Specify a default value for fields so that they don't need to be given in struct initialisers.
Points to consider:
- syntax
- type inference for field types?
- which values are allowed as defaults
- if a field implements
Default, can we use that value somehow?
- interaction with
derive(Default)
- interaction with
.. in initialisers
- some overlap with default arguments/keyword arguments
Previous discussion
Working directory: default-fields
Specify a default value for fields so that they don't need to be given in struct initialisers.
Points to consider:
Default, can we use that value somehow?derive(Default)..in initialisersPrevious discussion
Working directory: default-fields