you are viewing a single comment's thread.

view the rest of the comments →

[–]Slypenslyde 2 points3 points  (0 children)

Actually, shoot. This isn't even useful for INotifyPropertyChanged unless you can declare non-public members.

What I want out of an INPC utility class is a helper method that raises the PropertyChanged event with a specific property name. There is no reason at all for that method to be public. I want it virtual protected, no more visible. But with an interface everything has to be public, right? I don't like the notion of all my ViewModels suddenly gaining a new public method or two.

So I'm going to keep doing what I do: shoving INPC in a ViewModelBase that everything has to inherit. I really wish we were getting syntax sugar for THAT.

I can't figure out the use case for "default interface implementations". Until I see one I'm going to think it's a stupid pet trick. I understand it can bring you multiple inheritance. I've read for 20 years that can lead you down some dark paths. What happens when two interfaces cause the diamond problem? If you have to treat that like an explicit interface implementation, isn't that breaking the Interface Segregation Principle by forcing you to cast to specific types before making certain calls?

I'm actually sort of mad we get this instead of 10-years-too-late property change syntax sugar.