Malcolm McLean <malcolm.mcle...@btinternet.com> writes: > I'd like to design a language like this. If you add a quantity in > inches to a quantity in centimetres you get a quantity in (say) > metres. If you multiply them together you get an area, if you divide > them you get a dimeionless scalar. If you divide a quantity in metres > by a quantity in seconds you get a velocity, if you try to subtract > them you get an error.
Done in 1992. See <http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/syntax/measures/0.html> citation at <http://portal.acm.org/citation.cfm?id=150168> and my extension to it as part of the Loom system: <http://www.isi.edu/isd/LOOM/documentation/loom4.0-release-notes.html#Units> -- Thomas A. Russ, USC/Information Sciences Institute -- http://mail.python.org/mailman/listinfo/python-list