4 ms·
Practically, I disagree with the GP. A newtype is fine in these cases. You don't have to say you know what to do with negative Lengths if you have a smart const
by embwbam 6y ago
Practically, I disagree with the GP. A newtype is fine in these cases. You don't have to say you know what to do with negative Lengths if you have a smart constructor that won't let you create one.
- codebje 6y agoCan you subtract lengths as in "let length3 = length1 - length2" ?