2 ms·
I don't think it's so easily arguable. 1. What you've written looks quite similar to the lenses approach. 2. I disagree that having nested records brings no b
by yakshaving_jgt 6y ago
I don't think it's so easily arguable.
1. What you've written looks quite similar to the lenses approach.
2. I disagree that having nested records brings no benefit at all. What about when the types are generated on the backend so the shape of the model never goes out of sync across that boundary? For a non-trivial size application, I believe it's cheaper to use code generation to derive the type definitions, JSON encoders, and JSON decoders than it is to manually write all of it and try to make sure everyone on your team is disciplined enough to always make those changes.