|
|
|
|
|
by jitl
285 days ago
|
|
Not widely used but I like Typical's approach https://github.com/stepchowfun/typical > Typical offers a new solution ("asymmetric" fields) to the classic problem of how to safely add or remove fields in record types without breaking compatibility. The concept of asymmetric fields also solves the dual problem of how to preserve compatibility when adding or removing cases in sum types. |
|
An asymmetric field in a struct is considered required for the writer, but optional for the reader.