"Strong typing vs. strong testing"
Keith Thompson
kst-u at mib.org
Wed Oct 13 11:24:59 EDT 2010
RG <rNOSPAMon at flownet.com> writes:
> In article <8hl2ucFdvoU1 at mid.individual.net>,
> Gregory Ewing <greg.ewing at canterbury.ac.nz> wrote:
>> Tim Bradshaw wrote:
>> > In general any function
>> > which raises its argument to more than one power ... doesn't make
>> > much sense if its argument has units.
>>
>> That's not true. Consider the distance travelled by a
>> falling object: y(t) = y0 + v0*t + 0.5*a*t**2. Here t has
>> dimensions of time, and it's being raised to different
>> powers in different terms. It works because the
>> coefficents have dimensions too, and all the terms end up
>> having the same dimensions.
>
> This reminds me of back when I was a kid and my dad was trying to teach
> me basic physics. He kept saying that the acceleration of gravity was
> 9.8 meters per second squared and I just couldn't wrap my brain around
> what it meant to square a second.
>
> Now that I think about it, I still can't. :-)
Fuel economy can be measured in reciprocal acres (or reciprocal
hectares if you prefer).
miles/gallon or km/liter is distance / distance**3 --> distance**-2.
--
Keith Thompson (The_Other_Keith) kst-u at mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
More information about the Python-list
mailing list