No, I'm not thinking of
dec1 = hex1.toDecimal();
because
num1 = 0xff00 + 64;
works just as well and so does
functionThatExpectsNumber(0b1101);
as does
p1 = mat1 * vec1;
Lengths are just as absolute as integers, but we have different ways to input and represent them. A sufficiently advanced language understands the equivalences and does just the right thing. Adding apples and oranges does not happen.
Generally your function should not expect inches, it should expect some length and I can input it in any unit of length I want.
Sure there are cases where you're constrained and need to account for the limited range and precision of your underlying storage format, but that should not be the default for any modern high level general purpose programming language. We don't need to concern ourselves with grade school stuff, the computer can do it for us.
Adding apples to oranges is concern at a lower level than the abstraction we should be working with by default. Doing arithmetic by hand on pen and paper is pretty low level.
Adding apples to oranges is also a concern when you don't have proper types by which the system can deduce that orange is actually just 2.54*apple.