Positive

Denis Koroskin 2korden at gmail.com
Sun Oct 5 05:03:59 PDT 2008


On Sun, 05 Oct 2008 08:41:50 +0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> 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

much, Much, MUCH better! Especially once overflows would trigger  
exceptions I believe these would become very valuable.



More information about the Digitalmars-d mailing list