other bookmarks
David R. MacIver » Blog Archive » Functional code != Good code
Functional code != Good code
August 15th, 2008There’s a dangerous trap to fall into: The belief that functional code is automatically good code. Hopefully not too many people would come out and actually claim this, but it seems to be an unstated common belief. It’s also utter bollocks.
Functional programming gives you tools for writing good code. Good functional code can be very good (good imperative code can be very good too! But that’s not the point of this post). Bad functional code can be just as bad as its imperative cousin.
Now, what post about functional programming would be complete without some trivial one liners? Let’s start by summing a collection of integer elements.
Leave a reply