Positive

KennyTM~ kennytm at gmail.com
Sun Oct 5 08:39:04 PDT 2008


Bent Rasmussen wrote:
> Somewhere there is the dream of a pure function call syntax
> 
>    abs(real) sqrt(abs(real) x);
> 
> Total unification. And possibly total impossibility.
> 
> Looks beautiful tho.
> 
> - Bent
> 

But how to check 0 ∉ gamma(ℝ)?

This notation is simple for invertible functions and sets with finite 
elements, but won't be applicable for more complicated functions and types.

> "Steven Schveighoffer" <schveiguy at yahoo.com> skrev i meddelelsen 
> news:gc9ab4$1ai4$1 at digitalmars.com...
>> "Andrei Alexandrescu" wrote
>>> (Background: Walter has kindly allowed ".()" as an alternative to the 
>>> ugly "!()" for template argument specifications.)
>>
>> :(
>>
>> Another case of multiple syntax possibilities.  What was wrong with 
>> !() ? I didn't consider it ugly at all.  In fact, I prefer it.
>>
>> It's very alarming to me that something like this just has no problem 
>> getting in the language without community feedback.
>>
>>> Just a quick question - I am feeling an increasing desire to add a 
>>> template called Positive to std.typecons. Then Positive.(real) would 
>>> restrict its values to only positive real numbers etc.
>>
>> I wouldn't use it, if that helps at all.  Even if it was in Tango 
>> (i.e. not just because I don't use Phobos).
>>
>> -Steve
>>




More information about the Digitalmars-d mailing list