A Briefer Syntax for Using Concepts

w0rp via Digitalmars-d digitalmars-d at puremagic.com
Wed May 7 04:57:49 PDT 2014


Here is a question, is it possible for D, or any future language, 
to eventually take something like this...

void foo(InputRange)(InputRange range) 
if(isInputRange!InputRange);

...and to instead be able to write it like this?

void foo(InputRange range);

Where the latter expands into something like the former, and 
InputRange is not a type. How to declare such a thing in the 
first place doesn't matter that much. There are many ways that 
could be done. I'm just wondering if the above is possible at all.


More information about the Digitalmars-d mailing list