Do polymorphism or conditionals promote better design?

前端 未结 12 1842
长情又很酷
长情又很酷 2020-12-02 06:37

I recently stumbled across this entry in the google testing blog about guidelines for writing more testable code. I was in agreement with the author until this point:

12条回答
  •  悲哀的现实
    2020-12-02 07:20

    If you are using switch statements everywhere you run into the possibility that when upgrading you miss one place thats needs an update.

提交回复
热议问题