Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field normalization #419

Open
jackfirth opened this issue Feb 16, 2020 · 0 comments
Open

Field normalization #419

jackfirth opened this issue Feb 16, 2020 · 0 comments
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

Comments

@jackfirth
Copy link
Owner

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 any sequence? of pieces. In order to keep equality sensible, at construction time the sequence of pieces should be deduplicated and placed into an unordered set? so that the order of the input sequence doesn't affect whether two boards are equal?.

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 of normalizer? abstraction, I have no idea. Further research required.

@jackfirth jackfirth added 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 labels Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant