On Tuesday, 20 August 2013 at 16:49:35 UTC, QAston wrote:
Interfaces offer runtime resolution:

interface Comparable
{

}
void doStuff(Comparable c)
{
}
will work with anything that meets the specs for comparable.

For compile time resolution you can do this

Thanks QAston for your constructive and helpful suggestion. Actually this is more or less the approach that I'm following (researching for the time being).

Actually I assume that Prof. Meyer was at that point at some time, too. He just happened, so it seems, to have figured out a way to do polymorphism right and painfree. Pragmatically this (your suggestion) pretty closely matches how one approaches it in Eiffel (but don't tell Prof. Meyer! He'll probably vehemently elaborate on theory *g).

Whatever, that's basically what I wanted. Although I have to lament somewhat that D's doc (as far as I know) doesn't point that out clearly.

Thanks.

Reply via email to