std.rational?

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Sat Sep 28 04:15:59 PDT 2013


On 27/09/13 17:36, 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.

Well, obviously.  Actually I'm not unhappy with David's name per se but with the 
idea of being inconsistent with how other libraries name these methods. 
Boost.Rational uses the full names, I'll have a look around and see how other 
libraries name them and whether there is consensus.

Next week I'll try and do a close comparison of Boost.Rational and David's work 
to see if there's any overlap, at least in the core data type.

Is there any expectation that some later iteration of the C++ is going to 
specify a rational type?  If so, any expected naming convention?  I guess Boost 
reflects what would be implemented if so, but it's never an absolute, things in 
Boost.Random were dropped in the C++11 standard.

> One may argue you need not access numerator and denominator explicitly that much
> but I think it happens.

I agree.



More information about the Digitalmars-d mailing list