Read and Binary instances for ditributions does not check input validity #59

Shimuuar opened this Issue Feb 3, 2014 · 0 comments


None yet

1 participant


Both Read and Binary instances for distributions are derived automatically. This leads to number of problems.

  • It allows to create distributions in invalid state. Smart constructors do check whether input valid or not. Derived methid will blindly decode what they get.

  • It breaks compatibility. Several distributions have fields which cache expensive computation. Their number and meaning could (and did!) change over time. Each such change breaks data format compatibility. They shouldn't be serialized in first place and recalculated during deserialization.

@Shimuuar Shimuuar closed this in 2ee75e8 Jul 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment