Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2005-10-27 01:44:15

On 10/10/05 4:12 PM, "Matt Calabrese" <rivorus_at_[hidden]> wrote:

> Also note that just like with points and vectors, it generally doesn't make
> sense to add together two absolute temperatures, whereas it does make sense
> to subtract two. As well, it even makes sense to add the result of the
> subtraction to an absolute temperature, and the same goes for all other
> standard point and vector operations. Finally, just like in geometry, there
> are a few places where the rules can be broken regarding adding points, such
> as with barycentric combinations. With temperatures, a barycentric
> combination could be used to find the average temperature of the day. Just
> like with temperatures, the geometric representation applies to all other
> unit types. If users find it difficult to understand, most can get away with
> just using scalar quantities all of the time, though the more advanced users
> would recognize the benefits of using points and vectors.

If I recall my physics correctly, your use of temperature as a model is a
bad one. It _actually_ does make sense to add temperatures, just like two
lengths. That's because zero temperature is an actual zero point, just like
zero length. You can't use degrees Celsius or degrees Fahrenheit because
they have a built-in offset. You have to use an absolute scale, like
Kelvin[1]. Back when thermometers were invented, no one knew enough
thermodynamics to realize the existence of an absolute zero, let alone have
any technology that can generate temperatures close to that point.

If you want a better example, look no further than the main language of this
list. (Think "pointers," "offsets," and "array segments.")

[1] The "degree" was dropped from "Kelvin" because it's an absolute unit, so
math with it works just like "meters" or "kilograms".

Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

Boost list run by bdawes at, gregod at, cpdaniel at, john at