UFCS for templates

barryharris slackovsky at gmail.com
Fri Aug 9 00:22:10 PDT 2013


On Friday, 9 August 2013 at 04:33:52 UTC, barryharris wrote:
>>
>>    auto test2 = New!AnotherTest("test2", 20);
> oops, should read:
>
> auto test2 = New!AnotherTest(20);
>
> --------------------
> -1 for me anyway for the following reason:
>
> A.function(args)    // I know A is a function value parameter
> function!A(args)    // I know A is a template type parameter
> function!10(args)   // I know 10 is a template type parameter
> 10.function(args)   // I know 10 is a function value parameter
>
> So I don't like it...

To clarify, that above is what we have now but with the OP 
suggestion

A.function(args)

becomes too ambiguous as to whether A is a template parameter or 
function parameter (i.e. refers to type or value)



More information about the Digitalmars-d mailing list