6 ms·
The author called out the newtype solution specifically in the first paragraph: > it could push the task of precondition checking to its caller, and enforce vi
by mcronce 3y ago
The author called out the newtype solution specifically in the first paragraph:
> it could push the task of precondition checking to its caller, and enforce via types (or an assert) that the precondition holds
(Emphasis mine)