implement vs override
Peter C
peterc at gmail.com
Mon Nov 3 22:06:14 UTC 2025
On Monday, 3 November 2025 at 10:26:59 UTC, Serg Gini wrote:
> On Monday, 3 November 2025 at 09:32:45 UTC, Peter C wrote:
>> On Monday, 3 November 2025 at 08:34:02 UTC, Serg Gini wrote:
>>> On Monday, 3 November 2025 at 08:02:06 UTC, Peter C wrote:
>> 'the model name' ??
>>
>> Anyway...it's solved now. It turns out, that composition was
>> the answer here.
>
> So just to finalize for anyone who will read it.
> D doesn't have any issues
Well.. I wouldn't go that far ;-)
In C#, you just say "This method is for the interface, and this
other one is for my class, even though they share the same
signature."
Since D doesn’t support C#-like 'explicit interface declarations'
the programmer has to reach for other patterns.
So.. to your question -> programmers can decide for themselves
whether they prefer the extra ceremony in D.
As for me, I strongly prefer C#'s neat explicit interface syntax.
More information about the Digitalmars-d
mailing list