Questions about app design - OOP with python classes
Paul Rubin
http
Thu Mar 1 23:24:33 EST 2007
Steven D'Aprano <steve at REMOVEME.cybersource.com.au> writes:
> But if you used Apps Hungarian, and saw this line of code:
>
> if hmmCurrentHeight <= hinCriticalHeight:
>
> then you should instantly recognise that there's a problem. Comparing
> a height in millimetres to a height in inches is not a good thing to do,
> no matter that they're both floats.
That still sounds like an unreliable manual type system, instead of an
automatic type system that includes dimension analysis. You might
like this:
http://futureboy.homeip.net/frinkdocs/
There are many Python implementations of dimensioned units as well. I
posted one here a few weeks ago.
More information about the Python-list
mailing list