Functional Programming, How I started and Why?

Discover why functional programming transformed my coding journey. From data analysis passion to F# mastery—learn how functional languages changed everything.

4 min read 610 words

I am not the kind of technical person who started hacking/coding at a very early age. But I have a special love for numbers. I don't know why, but they've always fascinated me.

And this was the starting point—or I can say the reason—I started taking baby steps in functional programming. I like DI, not in terms of Dependency Injection, but in terms of Data Interpretation. Those tabular data and all the graphs and details that data can produce are awesome. It simply blows my mind.

It is possible to do analysis in almost any language, but as I have heard, it will be fairly easy with functional languages. Since I was coming from a .Net background (it's just what I use as my day job), I checked out F#.

I knew about F# even two years back, when it was picking up ground, but I thought I was nowhere near good with C# and one more language would just add more confusion. But now things are different. I am good with C# and love LINQ. So I gave F# a shot.

And trust me, it blows my mind. It was awesome. I never knew that programming could be this much fun. It is like everything that should be there is there. If I elaborate on my last sentence, I can say that normally I/we need to train our brain to learn any kind of language, but in the case of functional programming, the language learns to think like me. I don't have to put in special effort for that. And that is the fun part.

Even if I copy-paste things I wrote on paper as part of pseudo code or an algorithm, in most cases it will work. There is no conversion from pseudo code to code. And that is the power of the language—or I must say, that is what the language is. I don't know why any functional language is not being taught in colleges. Even before C, there should be a lecture on Haskell, LISP, or any other functional language.

My choice for this kind of language is entirely for the wrong reasons. I like mathematics and I don't mind if someone throws some complicated theory at me. But for languages like this, I chose them just because of things like saving keystrokes by not writing semicolons, functional composition being fun and easy, and being able to save a lot of time and effort because of this feature. Moreover, writing code in functional languages is fun.

There will be more detailed articles coming, specifically for web and game—two areas I know, one because of my day job and one because of love. But until then, here are some videos you can enjoy.

I like this series so much that I am still halfway through, but I am feeling blessed. It gives every possible in and out of functional programming with wonderful explanation.

Here is a video for people like me who sometimes can't leave object-oriented languages and still like to use functional programming concepts. Jessica Kerr is the sweetest speaker I have ever seen. If she explained in the morning that there is a moon out there, I think people would even buy that too.

And how can I forget wonder woman Rachel Reese. After her explanation, I can now claim that I know actors. I am not an expert, but I am also not clueless now. All thanks to her.

[nyc-fsharp] Rachel Reese on FSharp Agents from Richard Minerich on Vimeo.

Frequently Asked Questions

Why should I learn functional programming if I already know object-oriented languages?

Functional programming offers a different way of thinking that can make coding more enjoyable and efficient. It allows you to write code that closely mirrors mathematical logic and pseudo-code, reducing the mental effort needed to translate ideas into working programs. Many developers find functional languages like F# complement their existing skills while opening up new problem-solving approaches.

What is the main difference between functional programming and traditional languages like C#?

Functional programming languages are designed to think the way you naturally think, requiring less mental translation from concept to code. Unlike traditional languages where you need to train your brain to fit the language's paradigm, functional languages adapt to your problem-solving approach. This results in features like functional composition and reduced boilerplate code (like semicolons) that make development faster and more intuitive.

Is functional programming good for data analysis and interpretation?

Yes, functional programming is particularly well-suited for data analysis and interpretation tasks. The language's ability to handle mathematical operations naturally makes it excellent for working with tabular data, creating graphs, and extracting insights from datasets. This is one of the primary reasons the author chose to explore functional programming languages like F#.

Can I use functional programming concepts while still working with object-oriented languages?

Absolutely. You can apply functional programming concepts to object-oriented languages like C#, especially through features like LINQ. Many modern languages support hybrid approaches, allowing you to leverage functional paradigms without completely abandoning object-oriented principles, making it easier to transition and experiment with functional ideas.

Share this article