There are cases where the Field struct needs to have some processing:
The MissingValues is a field of the schema descriptor, but it is very needed at the Field.Decode(). Thus, the schema reading process ends up populating it.
The pattern constraint should be compiled only once, at field creation.
To embrace those cases, we should create a kind of constructor which receives a field struct and some other parameters and other parameters and updates the field internal state.
There are cases where the Field struct needs to have some processing:
Field.Decode()
. Thus, the schema reading process ends up populating it.To embrace those cases, we should create a kind of constructor which receives a field struct and some other parameters and other parameters and updates the field internal state.