Dealing with nested if then else/nested switch statements

前端 未结 7 1588
走了就别回头了
走了就别回头了 2020-12-30 08:43

Are there any design patterns/methods/ways to remove nested if then else conditions/switch statements?

I remember coming across some methods used by the Google folks

7条回答
  •  没有蜡笔的小新
    2020-12-30 08:59

    Were you thinking of Google's "The Clean Code Talks -- Inheritance, Polymorphism, & Testing" video? It discusses approaches to using Object Oriented techniques to remove if/switch conditionals.

提交回复
热议问题