FWIW, at Adobe, the philosophy was to not do much input checking.
Garbage-in, Garbage Out. If you pass in garbage, it is ok to get an
exception thrown back at you. Theoretically, folks debug their code to the
point where it won't need these checks in production. Sure, any individual
check is
Hi,
FWIW, at Adobe, the philosophy was to not do much input checking.
For a method that's called a lot/performance critical I agree. In this case it
was already doing a check and doing it incorrectly so I see no harm.
If this my my code I'd remove the Object altogether and make a range class
If this my my code I'd remove the Object altogether and make a range class
to pass in - that way you don't need any checks and it would be faster.
+1 to this. It always bugged me that I have to send a generic object as a
function parameter. If we have a typed object, we get the checks