How bad is it to use a built-in object, type or whatever as something it’s blatantly not, even if it performs in exactly the way you need? Assuming it’s clearly commented what you’re doing.
For example, to use a single CGPoint to represent a start and end point on a single line. Should I really be defining my own identical but differently named struct instead?
Edit: OK, using…
struct FloatRange {
CGFloat min;
CGFloat max;
};
typedef struct FloatRange FloatRange;
…instead. Are there no exceptions to the rule?
For type safety, you should be defining your own.
Also remember you can’t do
someRange.startorsomeRange.end. Rather, it would be the inscrutablesomeRange.xorsomeRange.y.