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.

posted Tuesday, November 07, 2006
You might want to consider Objective Caml, which is a very mature lanugage that integrates seamlessly the imperative, functional, and object-oriented programming paradigms.

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  
  Anonymous Lin Zhu on November 13, 2006
I've heard of OCaml, and actually know a number of OCaml fans. I'm a bit surprised that I somehow forgot about OCaml's existence when I wrote this post. I've actually been meaning to try out OCaml one of these days, and I'm sure the links you've provided will be very helpful. Thanks.  
  Blogger Laurence on January 02, 2007
yes i fully agree with you!  
  Anonymous servizi cartomanzia on November 15, 2007
With all due respect to OCaml and its fans, I suggest that Scala has some interesting and useful benefits:
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,  
  Anonymous jn on December 24, 2007