"Strong typing vs. strong testing"

RG rNOSPAMon at flownet.com
Wed Oct 13 03:31:03 EDT 2010


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.  :-)

rg



More information about the Python-list mailing list