Setup scala in linux
####Setup scala in linux and Hello World
it is so simple!
1. download scala from official website
2. unzip it: tar xvzf scala-2.10.3.tgz
3. create SCALA_HOME
export SCALA_HOME=~/projects/scala/scala-2.10.3/
add it to path
export PATH=$PATH:$SCALA_HOME/bin
4. create hello world
vi HelloWorld.scala
object HelloWorld {
def main(args: Array[String]) {
println("Hello, world!")
}
}
5. compile
scalac HelloWorld.scala
6. run
scala HelloWorld
####what do we get from scala?
simplicity, consistency and power.