阅读背景:

使重复的if / else或case语句更干燥

来源:互联网 

I often find myself with if/else statements that are essentially the same line repeated while comparing to a different value. Here I'm writing code to the predict the amount of deaths from a deadly influenza outbreak. It has been refactored into a case statement, that still is very WET:I often find myself with if/else statements tha




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: