Whither F#?
I really did entertain some slender hopes that F#'s release would lead to wider adoption of functional programming. The benefits of the functional approach are appealing enough on many levels that, I hoped, some developers would be willing to go through the necessary mind bend to avail themselves of the goodies. As far as I can tell (and there is not a whole lot of evidence to go on), this has not happened. F# intrigued a few programmers who kicked the tires and then went back to their regular work. This is rather like what Haskell did a year earlier, when it was the dernier cri on Reddit and other programming community boards before sinking back into its previous status as an unusual curio. The year before that, Erlang underwent much the same cycle.
For a long while, I have shared the opinion of many analysts that functional programming is just too much of a divergence from regular programming. That is, starting from a dead stop and jumping into a new language and a new paradigm was too much to ask; and the high price of admission would keep functional programming from ever truly breaking out. But Scala in good part solved this problem by being a multi-paradigm idiom. This means that it allows developers to learn the language inside the OO metaphor they already know, and then branch out into the functional way of life in small steps. To my eye, however, even Scala has not made it happen. Despite considerable enthusiasm for the language, almost all the Scala code I see is straight procedural code with no trace of functional coloring.
So, if it's not the language, then what is the problem? To my eye, it's the lack of demonstrable benefit for business solutions — which is where most of us live and work. Erlang, which is probably the closest to showing business benefits across a wide swath of business domains, is still a mostly server-side solution. And most server-side developers know and understand the problems they face. The extra lift of actors and a new VM platform don't have much appeal, because the existing tools are good enough. Add the complexity of rewiring their thinking for the functional paradigm, and there is virtually no appeal at all.
This is the nub of the problem. Functional programming cannot show enough lift in business areas to find itself taken up in preference to conventional solutions. As a result, it remains niche-bound, locked inside small problem domains in which its unique attributes can demonstrably shine.
One event that might well push it into the mainstream is the advent of truly many core processors (more than 16 cores, for example). At that point, the processor will force upon developers the need to think in new ways to unlock the performance potential the silicon promises. Then, the need to move beyond the current parallel models and adopt one that reduces side effects may become a requirement. At that point, functional programming will have a real story to tell. If this comes to pass, it'll happen soon, I expect. And with F#, Microsoft developers will have a ready tool.
— Andrew Binstock, Dr. Dobb's Executive Editor
[email protected]