Feedback on Átila's Vision for D
H. S. Teoh
hsteoh at quickfur.ath.cx
Sat Oct 19 17:18:34 UTC 2019
On Sat, Oct 19, 2019 at 03:55:38PM +0000, Max Samukha via Digitalmars-d wrote:
[...]
> 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.
IMO, you should file a bug for this one.
T
--
"If you're arguing, you're losing." -- Mike Thomas
More information about the Digitalmars-d
mailing list