Dr. Dobb's Digest August 2009
Fan, another new programming language developed in the multicore era, has recently launched its 1.0.45 release. It is a very active open source project with a very interesting approach to many modern concurrent programming challenges.
I began writing this post about Fan 1.0.44 a week ago. Now, Fan has a new version, 1.0.45.
Most developers don't want to learn a new programming language. However, Fan is a very attractive language for certain tasks because it is trying to solve many modern problems related to concurrency and multicore programming.
Fan is both an object-oriented and functional programming language. This means that a developer can combine functional programming code with object-oriented code. However, at the same time, it has built-in immutability, message passing, and REST-oriented transactional memory. It uses Java-style syntax. Therefore, Java and C# developers won't have problems to understand Fan code.
Its portability makes Fan almost unique. So far, it can run over the JVM (Java Virtual Machine), the .Net CLR (Common Language Run-time) and JavaScript. Its JavaScript support is one of the most exciting features I've found for this language. There are many other languages and libraries offering actors and many different concurrency models for the JVM and the .Net CLR. However, Fan's support for JavaScript could revolution the scripting performance. Scripting could take advantage of multicore.
However, the aforementioned sentence isn't right. Scripting should take advantage of multicore. Fan is evolving to offer JavaScript developers the possibility to tackle concurrency using actors and message passing features. Besides, you can also run it on the JVM or on the .Net CLR. However, you can expect Fan to offer additional compilers to run on new platforms. Portability is very important for Fan.
Fan creators talk about the productivity of Ruby with the performance of Java. Fan's performance is really interesting. As it offers the possibility to tackle multicore, developers can transform a slow performance language into a fast performance one. Undoubtedly, JavaScript's support is a great opportunity for developers to create higher performance RIAs (Rich Internet Applications) based on this popular scripting language.
It's a bit difficult to find a definition for Fan, because it tries to offer many different features in one single and simple language. In a few lines, this list offers a summary of Fan's main features:
The actor framework is really powerful. It supports the most important features required to create concurrent code without problems:
If you need functional programming, immutability, message passing and actors, you can take a look at Fan. If you are working with JavaScript, keep an eye on Fan. It can help developers to tackle multicore with JavaScript.
In the forthcoming months, expect to see new libraries, languages, compilers and Domain-Specific Languages appearing to simplify parallel programming for many languages, virtual machines and runtimes.