I think you are correct in that when you only have one implementation of a interface, then perhaps that interface isn't required. I have seen situations where that's the case. Ex The developer made interfaces for each concrete service class. In my opinion, this just adds more clutter.
I get the problem you are saying too and experienced that issue as well. If you absolutely know a particular instance will always be a certain concrete class, then declaring the variable as the concrete class is more meaningful.
Like you said, there are good reasons for interfaces. Interfaces are just another tool in your arsenal to write good code and enforce certain standards across the team.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think you are correct in that when you only have one implementation of a interface, then perhaps that interface isn't required. I have seen situations where that's the case. Ex The developer made interfaces for each concrete service class. In my opinion, this just adds more clutter.
I get the problem you are saying too and experienced that issue as well. If you absolutely know a particular instance will always be a certain concrete class, then declaring the variable as the concrete class is more meaningful.
Like you said, there are good reasons for interfaces. Interfaces are just another tool in your arsenal to write good code and enforce certain standards across the team.