Interfaces, traits, concepts, and my idea for a DIP

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 28 06:10:41 PDT 2015


On Tuesday, 28 July 2015 at 13:02:06 UTC, Jack Stouffer wrote:
> Overall a great idea!
>
> On Tuesday, 28 July 2015 at 12:49:17 UTC, Atila Neves wrote:
>> struct MyRange: static isInputRange { ... }
>
> I don't think you even need new syntax to get the error 
> messages. If you have a static assert in your unit tests for 
> isInputRange!MyType, then theoretically you could just modify 
> isInputRange to return error messages, right?

I guess, but not easily. I've written template mixins to do that 
before and it was awkward.

Atila


More information about the Digitalmars-d mailing list