8
shouts

The “Anti-For” Campaign - Matthew Podwysocki - CodeBetter.Com

published 256 days, 12 hours, 28 minutes ago posted by DustinDustin 258 days, 3 hours, 38 minutes ago
Monday, June 29, 2009 11:21:57 AM GMT Saturday, June 27, 2009 8:12:02 PM GMT

Recently, there has been an effort launched called the “Anti-If Campaign” in which they deride the use of if statements and instead, focus on Object Oriented Principles in order to create more flexible designs. Now certainly, I have a sympathetic ear to this cause as I’ve seen code that literally walks off the side of the screen due to nesting of if statements. Pattern matching to me, especially at the top level of the function is actually quite beautiful in a way, such as the implementations in Haskell:

category: Foundation | clicked: 49 | | source: codebetter.com | show counter code
tags: C#, F#, Functional Programming, Haskell