ufcs and integer params
Philippe Sigaud
philippe.sigaud at gmail.com
Sun Jul 15 10:17:11 PDT 2012
> On Sunday, July 15, 2012 05:30:55 Jay Norwood wrote:
> > I see from this other discussions that it looks like 2.059 ( or
> > maybe 2.060) does support something like 3.cm(). Not sure from
> > the discussion if it would also accept 3.cm as in the xtext/xtend
> > example.
Hi Jay,
I had a little fun with coding a units (SI units) system in D and pushed an
incomplete version on Github a few weeks ago:
https://github.com/PhilippeSigaud/Units
It allows things like:
auto distance = 100.km;
auto speed = 120.km/hour;
auto timeToDestination = distance/speed; // timeToDest is a time (seconds)
The version on Github is grossly limited (it's just a sketch), but it gives
an idea of what's possible. My goal is to code a generic unit system
generator, given user inputs such as a list of units and sub-units.
cheers,
Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20120715/14c47540/attachment.html>
More information about the Digitalmars-d-learn
mailing list