durban / seals

Tools for schema evolution and language-integrated schemata
Apache License 2.0
65 stars 7 forks source link

Support for backward/forward compatibility #10

Open durban opened 8 years ago

durban commented 8 years ago

Currently Compat[A, B] and Model#compatible(a, b) are symmetric (in A/B and a/b respectively). There are cases where it would be useful to have a "partial" compatibility relation. For example, we might only care that we can read serialized data from an older version, but we don't require that that older version be able to read current serialized data. For these cases, it would be good to have something like ForwardCompat[OLD, NEW] (and Model#forwardCompatible). And/or BackCompat[NEW, OLD] could be equivalent. (See also this comment.)