Scala: An Object-Oriented Language with Functional Programming Features

November 25th, 2009 by Darin Morrison

A couple of weeks ago I gave an overview of the Scala language.  This was originally prompted by a recent discussion about languages for teaching and what might be a nice replacement for Java.  I suggested Scala and since I was familiar with the language I was asked to give an introduction.

Scala is an object-oriented language with a sophisticated and flexible type system.  It also supports quite a few features which are familiar to functional programmers.  Some of the features of Scala include:

* Bounded (upper and lower) parametric polymorphism

* Pattern matching via case classes

* First-class “functions” via functional objects

* Type constructor polymorphism (quantifying over types with higher kinds)

* A generalized comprehension syntax (can be used for sequence comprehension or for monadic computations)

* Existential types

etc.

Although Scala’s type system is rather sophisticated, the basics of the language are easy to learn and there are quite a few tutorials and references available online:

http://www.scala-lang.org/node/197

2 Responses to “Scala: An Object-Oriented Language with Functional Programming Features”

  1. klaus maier Says:

    Have you looked at CAL Open Quark yet? http://openquark.org/Open_Quark/Welcome.html

    It Runs on top of JVM and is very Haskell like.

  2. Alba Marchisio Says:

    Open Quark.
    Yes I’ve used it a few. I still prefer Haskell as it is.

    Alba.

Leave a Reply