Bruce Guenter's Thoughts

Random musings about stuff that crosses my path.

Home
Archives
Subscribe via RSSXML Icon


My favorite blogs:


Valid XHTML 1.0!

Powered By Greymatter

Home » Archives » August 2006 » Functional programming goodness

[Previous entry: "Kenneth Lay (of Enron infamy) has died"] [Next entry: "Terrorists and traitors (updated)"]

08/03/2006: "Functional programming goodness"


I'm not sure when I picked up the notion of functional programming. I have had only a very brief introduction to LISP which some call one of the fathers of functional programming, and have never actually used any other modern FP languages (such as ML or Haskell).

Having said all that, Joel Spolsky's recent article on the goodness of functional programming entitled "Can Your Programming Language Do This?" reminded me how useful and powerful the particular ideas of "map" and "reduce" can be. I have used these two notions almost since the beginning of my learning Python. Somehow it just seemed obvious, although the need for lamda functions was a syntactical nuisance. First-class functions are also a great thing, and I've used the idea since before I learned Python (albeit limited in scope by the choices of languages).

Sadly, some of these concepts are decidedly non-obvious. Recently when one of my Python scripts was being reviewed by a co-worker, they made a comment about how opaque the use of map was. Having never been introduced to the concept, they just couldn't conceive of how this actually worked. This anecdotal evidence backs up Joel's comment about programmers who get stuck on one language (Java in his case).

I guess it goes back to the old saying: When you're a hammer, everything looks like a nail.

New Comment
Name:
E-Mail:
Homepage:
What is my last name?
Smilies:
smile shocked sad
big grin razz *wink wink* hey baby
angry, grr blush confused
cool crazy cry
sleepy hehe LOL
plain jane rolls eyes satisfied
 
Please note, I employ some fairly aggressive spam filters to kill bad comments and even ban posters. I do however receive copies of all comments posted, even if you get blocked. Any valid post that is blocked will be reinstated as soon as I can, and I will send the poster an email (if possible).