Sunday, October 7, 2007

Flying Frog move into Scala market

We posted a note that our ray tracer had been ported to Scala and asked if anyone would like a new book Scala for Scientists following on from our OCaml for Scientists and new F# for Scientists titles. The response was tremendous!

Needless to say, we're now diversifying into the Scala market and you'll most likely see a lot of free example demos and commercial Scala/Java products from us in the near future.

For us, the most interesting thing about Scala is the fact that it builds upon the Java legacy. Our area of expertise is technical computing (how computers can benefit scientists and engineers). We started out with C++ but quickly discovered the benefits of modern statically-typed functional programming languages of the ML family (primarily OCaml).

However, these languages are obscure compared to mainstream languages like C++, Java and even (in technical computing) good old Fortran. One obvious problem with this is lack of libraries. OCaml has a lot of libraries and, compared to mainstream languages, the libraries that exist for OCaml are of incredibly high quality. However, the world keeps changing and OCaml lacks libraries to deal with many recent inventions like web services (SOAP, UDDI, WSDL and so on).

The easiest solution to this problem is to build a new generation of functional programming languages on top of existing platforms that already have big user bases. Fortunately, efforts are underway to bring state-of-the-art programming languages to both of the major cross-language platforms. The F# programming language from a team led by Don Syme at Microsoft Research targets their .NET platform and the Scala programming language from an academic group led by Martin Odersky at the EPFL in Switzerland targets the JVM.

The .NET platform is a wonderful thing: designed to support multiple languages (the Common Language Run-time) and often more efficient than the JVM. However, for all intents and purposes, .NET means Windows only. Microsoft have the functional programming on .NET market pinned down with F# and they just switched on the development afterburners (expect a major announcement soon!).

That leaves the JVM. Java is the primary language for the JVM and has shot to super-stardom in recent years, becoming not only a dominant force in web programming but also technical computing and many other areas. Java is now widely used by scientists and engineers and is a particular favourite among bioinformaticians, not least because the JVM runs on Linux, Mac OS X and Windows. This is of particular interest to us because dozens of bioinformatics institutes across the world have bought our book OCaml for Scientists. Although the JVM was not originally designed to support multiple languages, several major new languages have been built on top of the JVM (e.g. JRuby and Groovy) and there has been much discussion about augmenting the platform with features (like tail recursion) to help the development of new languages.

We have no doubt that F# is about to make serious inroads into technical computing on the Windows platform, and will even draw in users from other platforms. However, if the purpose of building upon an existing framework is to exploit its popularity, then we must consider how popular the dominant languages for each framework are. In general, the popularity of Java and C# is quite close, with most users working on web programming, database programming and GUI application development. However, among technical users, Java is vastly more popular than the whole of .NET. In fact, the number of technical users of C# is similar to the number of technical users of OCaml. We learned this the hard way by releasing an FFT library for .NET before surveying the market properly, only to discover that it is only as popular as our Visualization library for F#.

F# is set to explode in popularity over the next three years and the vast majority of technical users on the Windows platform will migrate to F#, followed by many non-technical users. Scala has the disadvantages of a much smaller development group and no advertising budget but the advantage of growing on top of a vastly more popular platform. So we believe that both projects are about to reshape the programming language landscape. We just completed F# for Scientists. Now its time for Scala for Scientists!

4 comments:

Andy Czerwonka said...

Any progress on this?

Flying Frog Consultancy Ltd. said...

Hi Andy,

We have not progressed with this project. We decided to wait until Scala is a more mature project with a stable compiler and working IDE support. We are also hoping that Scala will acquire support for more features from ML (like automatic generalization) that currently make that family of languages much more productive than Scala for general programming.

In the meantime, we are focusing our efforts on the F# programming language from Microsoft, which is already far more advanced and commerce friendly following Microsoft's decision to productize F# alongside C# and Visual Basic.

Cheers,
Jon.

Werner Keil said...

I heard about this book at Eclipse Summit Europe (where F# was presented by its chief technologist)

He also highlighted, the Measures and Units Library for F# were an important part in such Sciencific use cases.

For both Java, Scala and other languages on the JVM, JSR-275 which we made public today (JCP PDR) is going to have a similar impact, as well as its RI, JScience.

I cannot say, if a future book title might be only around Scala, Java or JSR-275/JScience, but something like that "...for Scientists" is clearly on my mind.

Flying Frog Consultancy Ltd. said...

@Werner: That's very interesting. Combined with Martin Odersky's new company perhaps Scala will become commercially viable for us in the not-so-distant future.