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.


7 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").

Unknown said...

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

Anonymous 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

Nandita Rao said...

They employ a aggregate of intercourse pleasure techniques to hold you powerful and packed with them in bed. Come to us we will offer first rate lovemaking stumble upon that you had never informed before. Calling us surely is easy. You may call us on our number given in the website or possibly simply email us your needs. Relying to your needs and finances we will offer the quality appropriate escort and call girl for you. We've low cost and diverse packages for all.

Masterbation with chennai escorts

https://twitter.com/malvikaadhikar

https://twitter.com/sabinakhannet

https://www.instagram.com/malvikaadhikaricom/


http://www.shwetagupte.com/chennai-call-girls-photos.html

http://www.sunitanair.com/chennai-escorts-services.html

http://www.malvikaadhikari.com/

Saket Independent Escorts said...

I am Sonalisinha independent Saket Escorts provide high class Saket Escorts services connect me at any time in over all Saket.

Saket Escorts
Saket Escorts Service
Independent Saket Escorts