"Length" in Avalon
Frank Hileman wonders about the Length type in a comment on a usability post to Steven Clarke's blog. Here is his comment:
“..., like Length to represent a scalar. It is a scalar, why not use a double? This is what users want.“
Length is more than just the scalar value. It also represents the units – thus Length allows specification in points, device independent pixels, centimeters, etc. While one could imagine just taking doubles and having utlity functions to convert unit-based values into doubles, Length also allows for relative unit specification – for instance 62.5%. This is not convertible by the user into a double value, thus a structure, like Length, is required to represent it.