RFC: Units of measurement for D (Phobos?)

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 10 00:01:17 PDT 2015


On Wednesday, 9 September 2015 at 07:04:05 UTC, Per Nordlöw wrote:
> - David's library and quantities use different interal 
> representation. Davids 7-dimensional vector of rational 
> integers (a la Boost) is hardcoded to represent SI units.

You must be confusing the library with something else (or me with 
another David). I'm pretty sure that my original proof-of-concept 
is the most flexible of all of them, coming with support for 
composing arbitrary runtime conversion functions, affine 
quantities and so on. SI unit definitions are merely predefined 
in a second module because they are commonly used.

That being said, my implementation is ages old and could probably 
be done much better today.

  - David


More information about the Digitalmars-d mailing list