Sunday, 9 November 2008

Why does Functional Programming matter?

Of course we all know the answer...

...but recently I've been wondering how to explain what I feel is important about FP in a pithy, succinct way. (I've frequently found myself failing to explain it well).

I think in the future I'm going to say this:

"Functional Programming makes programs easier to understand. And that means they're less likely to go wrong."
For my money this is why functional programming is vitally important - because the biggest problem we have right now isn't concurrency ... it's the fact that we can't even write single-threaded programs that work properly. (Of course "go wrong" is used above in the standard rather than the Milner sense).

One other comment I'd make is that I think the "easier to understand" bit becomes more apparent with bigger programs.

I'd be interested in hearing if anyone's got a better way of describing it.


6 comments:

Crutcher said...

While this is a fun argument, I don't think its a very convincing one. You've give an unqualified 'easier', which begs the question, 'easier than what?'. No one who doesn't alread agree with you is going to buy that the answer is 'everything'. Indeed, I don't think most FP fans would agree with that either.

Ben said...

Hi crutcher. My aim isn't so much to be convincing - that's going to be tough to do in a sentence or so - as just to summarize my feelings snappily.

As to "easier than what"? - than mainstream imperative / OO programming styles. (Of course it's been claimed that Haskell's a pretty decent imperative language too - but that's probably largely because of the localisation of effects - which is all part of keeping things "understandable").

Mamatha Mamatha said...

you are article is good
http://www.callgirlsfinder.com/
http://www.callgirlsescorts.com/
htttp://www.Adultslisting.com/
http://www.Indiansexservices.com/

Sabina Khan said...

Hi, this is Sabina Khan one of the top Hyderabad Escorts girl working at handling independent Hyderabad escorts agency Hyderabad escorts, escorts in Hyderabad, Hyderabad escorts Services, Hyderabad independent escorts, independent Hyderabad escorts

Independent Goa Escorts said...

Hi dear my name is Natalya Dsouza the famous Goa escorts. I am an attractive, natural young escorts in Goa lady with style and class and likely the dream of every tough gentleman. I am 23 years old and my body slim sexy weight-45, Height 5,4,Hair Black, Eye- Black, My hobbies song listing. For more details
Goa escorts
Goa escorts services
Escorts in Goa
Goa call girls
Independent Goa escorts
Goa call girls

Mira Khan said...

The above escorts verity is in our Chennai escorts, and they are ready to mingle with you.

Teynampet Escorts

Triplicane Escorts

Vadapalani Escorts

Velachery Escorts