Scala is an actively used programming language created in 2004. Scala ( SKAH-lah) is a general-purpose programming language providing support for functional programming and a strong static type system. Designed to be concise, many of Scala's design decisions aimed to address criticisms of Java. Scala source code is intended to be compiled to Java bytecode, so that the resulting executable code runs on a Java virtual machine. Read more on Wikipedia...

15Years Old 458,238Users 4,559Jobs

Example code from the Hello World Collection:

// Hello world in Scala

object HelloWorld extends App {
  println("Hello world!")
}

Example code from Linguist:

#!/bin/sh
exec scala "$0" "$@"
!#

object HelloWorld {
  def main(args: Array[String]) {
    println("Hello, world!")
  }
}

Example code from Wikipedia:

val urls = List("http://scala-lang.org",  "https://github.com/scala/scala")

def fromURL(url: String) = scala.io.Source.fromURL(url)
  .getLines().mkString("\n")

val t = System.currentTimeMillis()
urls.par.map(fromURL(_))
println("time: " + (System.currentTimeMillis - t) + "ms")

Last updated August 22nd, 2019