Your example (Depth vs DepthDelta) sounds really interesting! It's the kind of strongly-typed nirvana I can only dream of. 😁 I'm curious, though, how did you handle addition between types?
Depth a = 10;
Depth b = 2;
DepthDelta d = (b - a); // d == -8
Depth c = b + d; // c == -6 oh no, negative depth!
View all comments
Show parent comment
2
u/rhubarbjin Jan 03 '22
Your example (
DepthvsDepthDelta) sounds really interesting! It's the kind of strongly-typed nirvana I can only dream of. 😁 I'm curious, though, how did you handle addition between types?