Useless interfaces

后端 未结 25 1590
南笙
南笙 2020-12-14 01:42

Why would you ever use an interface if you are only going to have one implementation of it?

25条回答
  •  庸人自扰
    2020-12-14 02:40

    Some people always create interface because they can be auto generated, so they are justifying working time creating interfaces, no matter if they are really used or not.

    For example, sometimes developers are evaluated per line of code written, so it make sense to use interface.

提交回复
热议问题