I don’t know how much you’re like me, but if you are, you can get bogged down in the specific meaning of words, concepts, definitions and how these apply to the real world. I can personally have a difficult time bridging the gap between notional definitions and real world practice — for instance, the beautiful castle on the hill we love called Agile versus what actually happens in the normal run of things.
I have faced a similar issue with functional programming as I continue to integrate it into my practical day-to-day. I just recently realized how much more trust and confidence I have in my own code. Ironically, this is a direct consequence of immutability — the very thing that held me back from seriously investigating FP for so long. “Immutable” is one of the most common words in the functional world’s lexicon. That’s been a bit hard on me because it just doesn’t find a happy home in my conceptual framework for “programming” at all. Inputs go into a program, the program changes them and the program spits out an answer. In other words, it mutates the inputs :).
By now, of course, I know that immutability is actually a tactic. It just means that you aren’t changing the value of any of the things (at least as much as possible). From this simple (and usually simply followed) idea, flows much goodness.
So if you’re like me — a bit of a stickler for literal definitions — and you’re interested in functional programming, try and let your guard down a bit. I have been chipping away at my preconceptions for a while now and I’ve been enjoying some success. You may too.
Hacker Noon is how hackers start their afternoons. We’re a part of the @AMIfamily. We are now accepting submissions and happy to discuss advertising &sponsorship opportunities.
To learn more, read our about page, like/message us on Facebook, or simply, tweet/DM @HackerNoon.
If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!