News for hackers. Stuff that matters.
Re:Don't overuse interfaces by sanderjd on Wednesday May 10, 2017 @09:08PM (#14313192)
If you use names like Logger instead of ILogger, you don't even have to change all the names when you refactor to an interface! If you end up wanting a FileBasedLogger, you just rename the current implementation to StdoutLogger, create a Logger interface, create a FileBasedLogger, and change instantiation sites to build the instance you want.
Re:Don't overuse interfaces by hota_mazi on Thursday May 11, 2017 @01:13PM (#14317663)
> If you use names like Logger instead of ILogger, you don't even have to change all the names when you refactor to an interface!

But you want to, that's the point. You're making a drastic change to your code base, surely you want to inspect every place where that type is used.

Re:Don't overuse interfaces by reitanqild on Wednesday May 10, 2017 @10:29PM (#14313476)
Using IClass naming is considered best practice in the .Net world AFAIK. (I think Visual Studio and/or Resharper hints very clearly about this.)
Re:Don't overuse interfaces by hota_mazi on Thursday May 11, 2017 @01:13PM (#14317672)
> Using IClass naming is considered best practice in the .Net world AFAIK.

No, it's the opposite. IClass is the norm, for legacy reasons going all the way back to the early COM days (it all started with IUnknown[1]).

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms6...

Re:Don't overuse interfaces by sanderjd on Thursday May 11, 2017 @10:59AM (#14316469)
I know, I'm demonstrating one reason I think that's a bad best practice :) I recognize there's nothing most people can do about that, though!