std.rational?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Sep 27 13:25:01 PDT 2013


On 9/27/13 1:08 PM, BLM768 wrote:
> On Friday, 27 September 2013 at 15:36:12 UTC, Dmitry Olshansky wrote:
>>
>> I bet the reason is practicality: try using full names of
>> denominator/numerator in some involved numeric code. It's a mess.
>> One may argue you need not access numerator and denominator explicitly
>> that much but I think it happens.
>
> I'm not sure if this fits with Phobos style, but they could be defined
> as "numerator" and "denominator" and aliased to "num" and "denom",
> respectively. That way, we get the best of both worlds.

No aliases please. num and dom is where it's at.

Andrei





More information about the Digitalmars-d mailing list