-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
I personally rather like bijections more than coercions.
E.g., if I have a web API that is supposed to accept snake case query params and I use ->kebab-case
to translate them to the codebase's internal format, then what I really have is an API that accepts snake case and kebab case and arbitrary combinations of the two. And this bothers me a bit.
Would it be welcome to add functions to this library that convert from one format to another and perhaps throw exceptions if the input is not in the expected format?
Problems
- n² new functions, which is a lot
- is this even well defined enough to implement reliably?
johanatan
Metadata
Metadata
Assignees
Labels
No labels