Scala (programming Language) - Comparison With Other JVM Languages

Comparison With Other JVM Languages

Scala is often compared with Groovy and Clojure, two other programming languages also built on top of the JVM. Among the main differences are:

  1. Scala is statically typed, while both Groovy and Clojure are dynamically typed. This adds complexity in the type system but allows many errors to be caught at compile time that would otherwise only manifest at runtime, and tends to result in significantly faster execution. (Note, however, that current versions of both Groovy and Clojure allow for optional type annotations, and Java 7 adds an "invoke dynamic" byte code that should aid in the execution of dynamic languages on the JVM. Both features should decrease the running time of Groovy and Clojure.)
  2. Compared with Groovy, Scala has more changes in its fundamental design. The primary purpose of Groovy was to make Java programming easier and less verbose, while Scala (in addition to having the same goal) was designed from the ground up to allow for a functional programming style in addition to object-oriented programming, and introduces a number of more "cutting-edge" features from functional programming languages like Haskell that are not often seen in mainstream languages.
  3. Compared with Clojure, Scala is less of an extreme transition for a Java programmer. Clojure inherits from Lisp and Scheme, with the result that it has a radically different syntax from Java and has a strong emphasis on functional programming while de-emphasizing object-oriented programming. Scala, on the other hand, maintains most of Java's syntax and attempts to be agnostic between object-oriented and functional programming styles, allowing either or both according to the programmer's taste.

Read more about this topic:  Scala (programming Language)

Famous quotes containing the words comparison with, comparison and/or languages:

    [Girls] study under the paralyzing idea that their acquirements cannot be brought into practical use. They may subserve the purposes of promoting individual domestic pleasure and social enjoyment in conversation, but what are they in comparison with the grand stimulation of independence and self- reliance, of the capability of contributing to the comfort and happiness of those whom they love as their own souls?
    Sarah M. Grimke (1792–1873)

    It is very important not to become hard. The artist must always have one skin too few in comparison to other people, so you feel the slightest wind.
    Shusha Guppy (b. 1938)

    No doubt, to a man of sense, travel offers advantages. As many languages as he has, as many friends, as many arts and trades, so many times is he a man. A foreign country is a point of comparison, wherefrom to judge his own.
    Ralph Waldo Emerson (1803–1882)