Lisp was created in 1958 and now marks nearly 70 years of functional programming. Zig, an imperative language created just about 10 years ago, already ranks above every other functional programming language in developer popularity.1
Going by popular opinion, functional programming is considered to be a superior model. So why has it not gone mainstream? I think I might have understood why.
Need to Know
For the past few months, I’ve been working full time on developing Ritchie, a programming language meant for distributed applications.
Deciding on the flavour of Ritchie was, obviously, important for maximum adoption as a business and enterprise application programming language. I picked a multi-paradigm model rooted in imperative style to get started. However, I still needed to know whether a paradigm shift is coming to programming.
Now I know that it isn’t. Working through the automatic concurrency model for Ritchie helped me discover why.
Abstraction
Functional languages are built for coding abstractions. They’re exceptionally good at it. Abstractions do not come by easily for real world concepts, though, and building them has a high upfront cost.
You cannot abstract something until you have understood it deeply enough, until you have examined the cracks and seams of the abstraction, and you have figured out how to keep them out of sight.
It requires understanding the real world, then creating an ideal model of it and then making sure that the model represents enough of the real world to make it useful.
There are very few opportunities for paying the cost of abstraction and reaping its rewards over and over. By definition, you can only abstract what is common and well understood.
Narration
Imperative languages are built for coding narratives. Most day-to-day communication is built around narratives. When it comes to breadth of coverage, narratives get there faster because they do not require comprehension or modelling. They just need a story.
That’s how business specifications are supplied too – user stories, tickets, specifications, bug reports – they all read as narratives.
Turning them into imperative code is close to transcription. Coding them into FP means sampling enough of these stories and tickets and bug reports over time to turn them into an abstract model first.
Who’s going to wait for that?
Comprehension
Can you figure out what’s happening in the code below?
(def rules
[[welcome-coupon? #(* % 0.9)]
[multi-buy? #(- % 5)]
[staff? #(* % 0.8)]])
(defn price [order buyer]
(let [applies? (fn [[applies-to? _]]
(applies-to? order buyer))
discount (->> rules
(filter applies?)
(map second)
(apply comp))]
(discount (base-total order))))
A narrative reads the same way when it’s written and when it’s read. It’s a sequence of steps, one building upon another. Beyond a certain length, it becomes too difficult to hold all the ifs and thens in your head, but until that point, it’s just progressively increasing difficulty. Oftentimes, you get what you needed without hitting that limit.
Abstraction on the other hand, is much harder to deconstruct. When you’re building with abstractions, you already have some familiarity with the small components that you’re assembling into bigger ones. That’s what makes functional programming so powerfully expressive when you’re writing code with it.
The price of that power is paid in comprehensibility, because you cannot understand the big picture, until you know enough about everything in that picture.
Here’s the logic from the previous functional snippet in an imperative language you’re unlikely to have known. Honestly, which version do you understand better?
function Price(o: TOrder; b: TBuyer): Real;
var Total: Real;
begin
Total := BaseTotal(o);
if WelcomeCoupon(o, b) then Total := Total * 0.9;
if MultiBuy(o, b) then Total := Total - 5;
if Staff(o, b) then Total := Total * 0.8;
Price := Total;
end;
BTW, the Clojure example has a subtle bug. You might not believe it, but it’s because the discounts are applied in reverse order of how they’re written in that snippet.
Goldilocks Zone
This is a bit like stating the obvious, but a survey of the most popular modern languages clearly shows the advantage of having imperative languages that borrow useful concepts from functional programming.
These languages tolerate unfinished abstractions better. You can narrate first, abstract later and keep narrating through the cracks until your abstraction is strong enough to encapsulate into a pure function. They also have just enough functional primitives that they can be fit into a narrative arc without reading like they’re out of place.
The borrowing is happening in reverse direction as well where functional languages are borrowing the narrative syntax. The Clojure example can be rewritten more idiomatically as:
(defn price [order buyer]
(cond-> (base-total order)
(welcome-coupon? order buyer) (* 0.9)
(multi-buy? order buyer) (- 5)
(staff? order buyer) (* 0.8)))
It’s the same sequential if-this then-that logic as in Pascal, and the steps apply top to bottom in the order they are written, which also fixes the price calculation bug.
Conclusion
Experienced or research-oriented people find themselves to be more productive with functional programming languages because they already have the opportunity and skill to create models and express complex systems as compositions over these models, which is the forte of functional programming paradigm.
Outside these domains, though, it’s hard to foresee a paradigm shift happening from narration to abstraction in how day-to-day dealings are conducted in real life. That then defines how software specifications are provided and that in turn means that imperative programming remains the least-friction way to develop the broad-spectrum day-to-day software.
Some people think it doesn’t matter anymore because nobody would be reading or writing code other than agents. Even if that were the case, agentic programming does not change the equation significantly because the choice is decided further upstream.
Popularity as measured by developer mindshare: https://survey.stackoverflow.co/2026/technology/data/languages ↩︎