
11 Oct
2005
11 Oct
'05
1:33 p.m.
Although I appreciate your efforts to implement an efficient way to automatically convert different units for the same quantity, I would still prefer a library that requires an explicit "cast" to change units, rather than implicit. Perhaps the library could be built in two layers, with the lower level requiring explicit casts and a layer above that that implements implicit casting for those who want it. What I'm more interested in learning is how you handle "composite quantities", which are obtained by multiplying and dividing existing units (like "meters/second"), as well as raising to a rational power (like the standard unit of volatility in finance, "1/square_root(years)".