On Being “Functional”


There is more and more talk going on about functional programming nowadays; the paradigm is finally understood, accepted, implemented in most runtimes and used by many software engineers, in a more or less aware fashion (just think of JavaScript) and in a more or less hybrid form (just think of Scala).

I say “finally” because functional programming has many useful properties, among which:

  • It enables building and reusing components at the level of computation logic, which is a more fine-grained one than objects or modules.
  • It enables a more declarative style that can reduce code size, enhance readability and improve maintainability.
  • With its emphasis on pure functions, values and stateless logic, It helps reasoning and getting more aware about when state and mutability are really useful, and when instead they do more harm than good.
  • Less state also means less contention, so being stateless greatly helps in building parallel, loosely coordinated and horizontally scalable systems.
  • Stateless means simpler behavior too, which can even amount to feasible correctness provability of a program in some cases (as an aside, recursive functions are also a core concept in theory of computability, which is one of Computer Science’s mathematical foundations).
  • Functions are also an essential tool to build models of phenomena that depend on some variables, so paradigms based on functional programming foster an accurate, mathematical modeling mindset.
  • A function is a transformation, so it makes it easier to think in term of data manipulation and data flow (which matters a lot for users and businesses) rather than in terms of control flow and state (which matters mostly to bare machines and lower-level, procedural programming)

But actually I’d like to focus more on a non-technical, more important topic, as “functional” can actually mean more than knowing, using, or even mastering functional programming.

What does it mean to be a “functional” programmer, architect, engineer, craftsman, name it? And what does it mean to be a “functional” human being? This specific meaning of “functional” is connected to “purpose”. What is the purpose of what we do, and are we satisfied with it?

I suggest you watch the following video before going on.

People need a purpose to feel peaceful and happy, and an extremely satisfying one, perhaps the most satisfying of all, is giving something to other beings just for their benefit’s sake.

Why is that? Because giving is an extremely powerful way to connect at an emotional level. And we need connecting in order to let go at least some of our ego, which means letting go at least some of our loneliness. Let alone the fact that connection and understanding are actually true knowledge, not opinion and judgement. This is actually a literal meaning of the latin “religio” word: “reconnecting, becoming one again”.

So, are you practicing religion in your daily lives and jobs, for your own and others’ (as there is no real distinction) happiness? Are you satisfied with your giving?

The answer is of course subjective; but what can a software craftsman give in order to become a more world-functional one? Contributing to Open-Source and giving work for others to freely benefit is one option. Another is creating the right circumstances under which some work can be used more easily for good. For example, what about giving free products access to hospitals, schools, non-profit, humanitarian, or generally organizations primarily oriented towards helping out? What about volunteering with own skills, be they technical, software-related or otherwise?

If you feel like personal interest, neutrality, and even freely giving neutral things are just not enough anymore, it might be the case that time has come to start working towards the goal of becoming more “religious”, that is simply more “functional” to happiness in this world.

Leave a Reply