Questions about app design - OOP with python classes

Diez B. Roggisch deets at nospam.web.de
Fri Mar 2 03:30:20 EST 2007


> A type system doesn't help. So what if they're both floats? The test
> is still bogus, your code will still wait too long to engage the
> retro-rockets, and the billion dollar space craft will still be travelling
> at hundreds of miles an hour when it reaches the surface of Mars.

A type system _could_ help. Multi-Level-Specification allows you to 
express physical quantities with their respective unit, and operations 
on them to yield the combined unit at compile-time. There are some 
rather complicated cases where simple unification won't solve the 
type-equations, but then you might annotate things explicitly.

Diez



More information about the Python-list mailing list