Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In C# interface members can be implemented explicitly, which means that: 1) they are not visible on the object itself, only on interface-typed references to it, and 2) implementations of methods from multiple interfaces don't need to match since they live in separate namespaces.

It's true that you can't access private members (not just fields) on `this` from the mixin interface. But explicit implementations of members mean that only someone explicitly downcasting the object will get access to those members, so accidental access is not an issue.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: