Chris Stryczynski

Software Developer / Consultant

Functional programming has made me a worse programmer

Posted on: 03/02/2017

Let the rant begin! The title is click bait.

But, I will say that learning functional programming has made me a worse imperative programmer in some circumstances. Let me explain myself, programming with Haskell (a functional programming language) has made me more trusting of code, where I may previously have been more skeptical/investigative.

In addition, I have become more grumpy with imperative code. At the same time, I have become more accepting of errors due to the fact that I recognize (well at least I think I do!) how a mistake could have been prevented.

I definitely recommend learning functional programming - I feel it’s been one of the most positive significant decision of my career. It has tremendously strengthened my programming ability - even with a completely imperative language/codebase, and has concreted various programming techniques or ideas.

But do bear in mind that if you’re in an imperative crowd / codebase:

  • You might find some resistance from your colleagues if you start introducing some ‘functional aspects’. (“Why don’t you just use a for loop? Why are you using a callback here for no reason? You do realize static methods are bad?”)
  • You might find yourself being more frustrated than usual with code.

It is unfortunate that this dissonance exists, but bear with it - it is certainly worth the trouble.

Personally, it has taken me months to feel confident in recognizing the benefits and took me even longer to become fluent with a functional mindset. I hope this is helpful.

Comments

No comments, yet!

Submit a comment