Compile-Time Interfaces (Concepts)
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jul 17 15:49:30 PDT 2014
AFAIK there is no compile-time variant of interfaces right?
Why is that?
Wouldn't it be nice to say something like
struct SomeRange realize InputRange
{
/* implement members of InputRange */
}
and then the compiler will statically check that that all members
are implemented correctly.
I guess this requires some new syntax to describe what an
InputRange is.
Kind of like C++ Concepts.
More information about the Digitalmars-d-learn
mailing list