Positive

Alexander Pánek alexander.panek at brainsware.org
Sat Oct 4 22:01:59 PDT 2008


Andrei Alexandrescu 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?

I’d even suggest putting those into the language as primitive types — I 
just figured out they are not. Puzzled me a bit.



More information about the Digitalmars-d mailing list