ufcs and integer params
David Nadlinger
see at klickverbot.at
Fri Jul 20 08:59:25 PDT 2012
On Friday, 20 July 2012 at 12:28:52 UTC, Philippe Sigaud wrote:
> Hmm, looking at it, I guess kilo is just
> 1000 as an enum in your code? That's a good idea.
Sorry, that should have been »kilo!gram«. It actually creates a
new unit with a conversion factor of 1000 relative to the base
unit (well, it does a few more things to handle cases like
kilo!(milli!meter)), with the point being that the quantities are
actually stored in memory "verbatim", i.e. without being
normalized to e.g. SI units. Making »kilo * gram« work would be
easy, but I decided it could lead to confusing situations.
David
More information about the Digitalmars-d-learn
mailing list