In the recent discussion on typing in J, I cited the Gimley Glider and the Mars Climate Orbiter as events in which confusion over units of measure caused expensive problems and near-disaster (disaster in the case of the MCO).
This morning, I was reading the SIGPLAN Haskell Symposium '14 Proceedings, and found this article: http://www.cis.upenn.edu/~eir/papers/2014/units/units.pdf By way of introduction, the paper cites the same two events, and also cites (bottom of page 1) a paper that gives more of the same. The paper is worth reading, IMO, because the authors create DIMENSIONs: mass, length, density, volume, etc., that are independent of units (kilogram, furlong, fortnight). They also introduce two kinds of combinators (adverbs) that can modify the dimensions, e.g,: type Velocity = Length: / Time type Kilogram = Kilo :@ Gram NB. Kilo is prefix, not unit This lets them do things such as multiplying Kilograms times Gram (and getting the right answer) , while forbidding Meter * Gram. I think these folks have some good ideas that could be exploited in J and APL to everyone's benefit. Bob -- Robert Bernecky Snake Island Research Inc 18 Fifth Street Ward's Island Toronto, Ontario M5J 2B9 [email protected] tel: +1 416 203 0854 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
