DIP 84: Static Inheritance
Shammah Chancellor via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 30 12:31:36 PDT 2015
On Friday, 30 October 2015 at 16:44:15 UTC, Atila Neves wrote:
> On Friday, 30 October 2015 at 15:45:00 UTC, Shammah Chancellor
> wrote:
>> On Friday, 30 October 2015 at 14:39:47 UTC, Atila Neves wrote:
>>> From the discussion here: <snip>
>
> I took a look. I don't think we should or need to use classes
> and therefore dynamic polymorphism to solve the problem of
> checking for adherence to a static interface.
>
> Mostly all I want is for the compiler to tell me why something
> doesn't compile - it already knows it but is hiding the
> information from me.
>
> Atila
I'm not advocating for the implementation, but the dynamic
polymorphism isn't required. The class is just a skeleton for
specifying the definition in a clear way. See the unit test:
https://github.com/schancel/phobos/blob/4ca5d075f31b8e09ba71ac2a53ff56ff0c4ac5b9/std/experimental/concepts.d#L280-L303
More information about the Digitalmars-d
mailing list