3 ms·
I would controversially add, - don't use interfaces until you absolutely have to, and then try and find another way. YMMV, but in my corporate experience with
by gonzo41 6y ago
I would controversially add,
- don't use interfaces until you absolutely have to, and then try and find another way.
YMMV, but in my corporate experience with OO code, I find a lot of interfaces that have one implementation. It's a waste to plan for a future that doesn't come.
I feel we're lacking something like software mindfulness. Where you stay in the moment and just solve the problem.
- jolux 6y agoIt depends what language you’re in. As long as you can use fakes, it doesn’t matter if you use interfaces or not. In C#, implementations are sealed by default so faking them is not feasible unless you make the function virtual.