3 ms·
> To do that you need to represent the invalid configuration as a type Right - and one thing that keeps coming up for me is that, if you want to maintain comp
by 12_throw_away 1y ago
> To do that you need to represent the invalid configuration as a type
Right - and one thing that keeps coming up for me is that, if you want to maintain complex invariants, it's quite natural to express them in terms of the domain object itself (or maybe, ugh, a DTO with the same fields), rather than in terms of input constraints.