
4 Dec
2008
4 Dec
'08
4:49 p.m.
Mathias Gaunard wrote:
Mika Heiskanen wrote:
If the value must be checked beforehand, why bother using a constrained type at all?
Because it performs checking in debug mode to make sure the invariant is indeed true.
So, the goal of a constrained value is to check the same thing twice while in Debug mode, even though it will still be checked elsewhere in both debug and release modes? What happens when someone doing maintenance gets these two separate checks for the same thing out of sync? I see how your model can cause extra problems, but I don't see how it makes anything easier. John