Replies: 7 comments
-
To reiterate my question, is this not something that could be solved by the runtime so there is no inadvertent box? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if I got this right. Does that mean that the following code will not be valid? interface I1
{
void M();
}
interface I2 : I1
{
override void M() { }
} |
Beta Was this translation helpful? Give feedback.
-
@Logerfo That is correct. The correct syntax to use will be interface I1
{
void M();
}
interface I2 : I1
{
void I1.M() { }
} |
Beta Was this translation helpful? Give feedback.
-
Not if the |
Beta Was this translation helpful? Give feedback.
-
Indeed. The only thing that I could think of that could be done to prevent the box there is to have I just think it's a real shame to have to live with this wart and I could see it unexpectedly biting people. It's be nice if default implementations could be functionally identical to explicit implementations on structs in this regard. |
Beta Was this translation helpful? Give feedback.
-
We followed this design direction for a little while and found it exceedingly complex. It would probably more than double the complexity of the feature for questionable user value. |
Beta Was this translation helpful? Give feedback.
-
Understood. I appreciate that you guys at least explored such an option even if it wasn't found to be worth the complexity. It's a shame that the CLR will have this wart. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
C# Language Design Notes for Oct 17, 2018
Agenda
Beta Was this translation helpful? Give feedback.
All reactions