|
Boost : |
From: Dean Foster (foster_at_[hidden])
Date: 2001-09-10 14:44:11
I like many of the ideas in the SIunits approach, but it seems that it
is kinda brittle towards extension. I think it is important that new
units be trivial for the user to create. So my question for those
that know the SIunits system better is: "What would it take for a user
to add a new dimension?" How would say a Dollar be defined? I want
it to be different from pure numbers and different from all other
types. But, I want to be able to talk about Dollars/kg (where kg is
one of the units previously built into SIunit).
Ideally I'd like to see a layered system.
(1) A basic level of units that are easy to define.
(2) A SI layer that implements the SIunits on top of it.
Then if other units (say Dollars) were also defined they would
"inherit" from the basic level and thus play well with the SIunits.
Ideally, it should only take a few lines to define a new unit.
later,
dean
p.s. I of course am not an impartial observer! The above layering is
the way I implemented my units library. But I never got around to
actually implementing the SI stuff since it never was needed by me.
=============================================================================
Dean Foster dean_at_[hidden]
Statistics, Wharton, U. Penn 215 898 8233
Philadelphia PA 19104-6302 http://diskworld.wharton.upenn.edu
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk