Positive

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Oct 4 21:41:50 PDT 2008


dsimcha wrote:
> == Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article
>> Jason House wrote:
>>> Andrei Alexandrescu Wrote:
>>>> Positive.(real) sqrt(Positive.(real) x);
>>> Ummm... That's not even the correct signature for square root. It
>>> should accept non negative numbers.
>> Rats. I was thinking positive means >= 0 and strictly positive means >
>> 0. According to Wikipedia, positive really means strictly positive and
>> the longer-to-type NonNegative should be used instead :o|. For such a
>> simple concept, a short and sweet name is pivotal. If there are any
>> ideas for a better choice, please make them known.
>> Andrei
> 
> Maybe create the templates as a back end using whatever name, and then create
> typedefs/aliases for ufloat, udouble, ureal?  This would definitely be consistent
> with ints and easy to remember.

I think that's a great idea. So, the question becomes: how do people 
feel about using ufloat, udouble, and ureal?

Andrei



More information about the Digitalmars-d mailing list