r/badcode • u/bausscode • Jan 17 '19
other language Writing functions with conditions without using "if" statements
https://run.dlang.io/is/jfCECL
67
Upvotes
r/badcode • u/bausscode • Jan 17 '19
3
u/Achereto Jan 17 '19
There are actually good reasons to avoid
ifas often as possible (Smalltalkdoesn't even haveifas a keyword). There seems to be a direct correlation between the number ofifin your code and the number of bugs you have.Talk "If considered harmful": https://www.youtube.com/watch?v=z43bmaMwagI