On Saturday, 9 June 2012 at 01:11:49 UTC, Stewart Gordon wrote:
On 07/06/2012 18:49, Joseph Rushton Wakeling wrote:
Sorry for the double-post -- I already asked this in d-learn, but this may be a better
place to ask.

What's the current state of affairs and roadmap for inclusion of rational number support
in D?

Including it in D seems very unlikely.

Including it in Phobos, OTOH, is another matter.

I've come across David Simcha's work:
http://cis.jhu.edu/~dsimcha/d/phobos/std_rational.html

... and a feature request on the bugzilla:
http://d.puremagic.com/issues/show_bug.cgi?id=7885
<snip>

Well, do these work at the moment?

If so, I suggest you use one of them for now. If you're mainly just doing simple arithmetic with them, it probably wouldn't be too much work to convert your code to use the Phobos rational type when/if it gets one.

Stewart.

I've never had any use for rational numbers as have 99% of developers I believe. Maybe I'm overlooking something, but I see only two possible usages of them: math packages and length quotations in the english system. Because of this, I'd rather see them in Deimos than in Phobos.

Reply via email to