3 ms·
> I work in a .NET world and there many developers have this bad habit of "interface everything", even if it has just 1 concrete implementation I work on a Jav
by SkiFire13 1y ago
> I work in a .NET world and there many developers have this bad habit of "interface everything", even if it has just 1 concrete implementation
I work on a Java backend that is similar to what you're describing, but Intellij IDEA is smart enough to notice there is exactly one non-test implementation and bring me to its source code.
- vrighter 1y agonot that familiar with java, but in .net when you do this, it is very common for the implementation to be in a separate assembly, part of a different project
- cweld510 1y agoDoesn’t that imply an interface is necessary though, so you can compile (and potentially release) the components separately? I don’t use .net but this sounds quite similar to pulling things into separate crates in Rust or different compilation units in C, which is frequently good practice.
- mystifyingpoi 1y agoDefinitely that could imply the necessity of an interface, but often it's simply done, because everyone working in a project blindly follows an already established poor convention.
- vrighter 1y agoby "it's common in the .Net world" I mean that it seems to be an antipattern that's blindly followed. If there's only ever one implementation, it is the interface, imo