Tuesday, November 07, 2006
Scala Programming Language
Today I went to a talk on the Scala Programming Language. According to its creators, Scala "smoothly integrates features of object-oriented and functional languages". It's also got static type checking, and from the little bit I've seen so far the type system seems fairly powerful. These are all things I've wanted in a language for quite some time.
The languages that I use at work, mostly Java and Python, are normally classified as "object-oriented". Python does have a bit of a functional flavor to it as well, but it seems that most people think of functional and object-oriented styles of programming as almost completely disjoint. I've been finding that I've been gradually moving to an ever more "functional style" of object-oriented programming, even when programming in Java, so I was happy to see a language designed to integrate the two styles.
1) The notation offers a more gradual transition between OO and functional approaches;
2) Because it runs on the JVM and interoperates with standard classes, you have access to a familiar ecosystem with a great deal of useful functionality;
3) The point above (#2) includes not only Java libraries, but also JRuby (etc.), which allows one to pursue easily a strategy of using the right language(s) for each aspect of the task at hand,
Much helpful information can be found online. The official website is at http://caml.inria.fr/ with the manual at http://caml.inria.fr/pub/docs/manual-ocaml/index.html
But the tutorial at http://www.ocaml-tutorial.org/ might be much more helpful for beginners. There is a good and concise book draft at http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Ffiles.metaprl.org%2Fdoc%2Focaml-book.pdf&ei=6zpZRcy5OpnQoAL9r5GwCQ&usg=__x6oyD0T3-soV_oIo1kpt4M4smOI=&sig2=WCMCWEgNoLOcxN2hxQO_9Q and a much thorougher one at http://caml.inria.fr/pub/docs/oreilly-book/
The explanations of advanced technical details, such as type inference, can be found at http://pauillac.inria.fr/~remy/cours/appsem/ocaml.pdf