Field normalization #419
Labels
enhancement
New feature or request
needs api design
The public API changes for this feature aren't yet designed
needs use cases
More use cases are needed to figure out a good design for this
Sometimes a data type wants to normalize values for a field, usually so it can accept a broad range of inputs while still preserving meaningful equality semantics. For example, a board game data type may wish to represent the pieces on the board as a
set?
, but allow construction from anysequence?
of pieces. In order to keep equality sensible, at construction time the sequence of pieces should be deduplicated and placed into an unorderedset?
so that the order of the input sequence doesn't affect whether two boards areequal?
.It would be handy to have some integration with
rebellion/type
for this kind of thing. Whether that means a#:normalizer
keyword on fields or some sort ofnormalizer?
abstraction, I have no idea. Further research required.The text was updated successfully, but these errors were encountered: