This is the continuation of a conversation started at Brian’s post on approaches to parallelism infrastructure, and continued at Thinking Parallel.
Although their blog post certainly right in that functional languages are a entirely different paradigm and approach to development, and therefore there is a high barrier to their entry, I’m with Brian’s post here — sooner or later, functional languages are going to make it into the mainstream, because the parallelism advantages are just too great to ignore.
Note that there is a precursor for this kind of change: the coincidental rise of the GUI and object oriented languages. When GUIs simply became necessary for many/most development projects, the business languages shifted to the object-oriented model, which is the most natural for that domain. That said, it took 20-odd years into the wide scale adoption of graphical applications before the change made it.
We will be in a similar case soon regarding parallelism. At this point, single-threaded performance has tapped out: chips aren’t getting the kind of incredible boosts in mHz that they used to. Instead, we are seeing speed growth through multi-core, which provides performance benefits only accessible to multi-threaded/multi-process applications. The problem is that the existing set of business languages and their semaphore-based locking mechanisms are nightmares, and that attempting to retrofit clean performance solutions is an uphill battle (trust me, I know). So, unless the business need for performance stops growing, the push for languages with enhanced parallelism is going to be inevitable.
That said, I think that the idea of a shared virtual machine that can execute both object-oriented code and functional code is a pretty powerful idea, and would get some very major gains. Unfortunately, without some major changes into virtual machine design, it looks like you can either have fast mutable (OO) code or fast immutable (functional) code, not both. And right now, the only popular shared virtual machines (Sun’s JVM for Java/Scala), Microsoft’s CLR for C#/F#) emphasize the fast mutable code, and they don’t offer the “free” performance win that something like JoCaml gets you.
As a final aside, I’d note that I’m with David Heinemeier Hansson on one point: I think the web server/web application is going to be the last place to go, because the standard use case gets you the paralellism for free. If you’ve got a process-per-request model, you can rely on the traffic through your website (and the OS kernel) to take advantage of the multi-core performance for you. So the push to change towards functional models aren’t there. This is somewhat akin to the way the OO push never really made it into sys admin languages like shell scripting or Perl. That said, there’s already a lot of functional leaking into the Ruby way of thinking, and that will continue to increase as functional languages make it into the mainstream.
Popularity: 21% [?]