On Tuesday, 28 July 2015 at 12:49:17 UTC, Atila Neves wrote:
So... instead of having traits / concepts, what I wanted from D
is to be able to do this:
struct MyRange: isInputRange { ... }
+1
or
struct MyRange: static isInputRange { ... } // that way classes
could do this too
What about this instead:
@satisfies(isInputRange) struct MyRange { ... }
which is not as terse, but maybe less confusing, because
intuitively ':' could be mistaken to mean 'extends'.
'static' has too many meanings already for my taste. I really
don't like it when frequently used keywords are reused to mean
different things in slightly different places.