Feedback on Átila's Vision for D

Max Samukha maxsamukha at
Sat Oct 19 15:55:38 UTC 2019

On Friday, 18 October 2019 at 16:10:31 UTC, Atila Neves wrote:

> I don't understand what you mean by this. What is it about OOP 
> in D now that you can't get done without a library solution? 
> And why are library solutions insufficient for those purposes?

One cringeworthy problem with D's implementation of interfaces 
and classes is how D resolves method conflicts. Conflicting 
interface methods are silently collapsed into one implementation, 
which seems to be by design and is definitely incorrect.

interface Display {
   void fmt();

interface Debug {
   void fmt();

class C: Display, Debug {
   override fmt() {  } // implements both interfaces

At the very least, this should be an ambiguity error. Some 
languages (C#, Rust) allow to disambiguate.

More information about the Digitalmars-d mailing list