"Strong typing vs. strong testing"
niklas.holsti at tidorum.invalid
Tue Sep 28 18:52:43 CEST 2010
Albert van der Horst wrote:
> In article <87fwwvrnmf.fsf at kuiper.lan.informatimago.com>,
>> I would even go further.
>> Types are only part of the story. You may distinguish between integers
>> and floating points, fine. But what about distinguishing between
>> floating points representing lengths and floating points representing
>> volumes? Worse, what about distinguishing and converting floating
>> points representing lengths expressed in feets and floating points
>> representing lengths expressed in meters.
> When I was at Shell (late eighties) there were people claiming
> to have done exactly that, statically, in ADA.
It is cumbersome to do it statically, in the current Ada standard. Doing
it by run-time checks in overloaded operators is easier, but of course
has some run-time overhead. There are proposals to extend Ada a bit to
make a static check of physical units ("dimensions") simpler. See
and inparticular the part where Edmond Schonberg explains a suggestion
for the GNAT Ada compiler.
> A mission failure is a failure of management. The Ariadne crash was.
Just a nit, the launcher is named "Ariane".
niklas holsti tidorum fi
. @ .
More information about the Python-list