Positive

Bent Rasmussen IncredibleShrinkingSphere at Gmail.com
Sun Oct 5 08:31:13 PDT 2008


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

"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