> You are not taking into account when a function is passed an argument and 
> needs it to be in some range.

If you pass an out-of-range argument, you should reject it using a 
precondition, thrown error, or nil return value. And if for some reason you 
really *do* want to force the value into the range, clamping it to the bounds 
of the range seems like a more sensible solution than modulo. I'm sure there 
are cases where you *would* want to do this, but they seem like they'd be few 
and far between.

-- 
Brent Royal-Gordon
Architechies

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to