Tuesday, August 31, 2010

More on Scala

Get Started on Debian/Ubuntu


Install scala, this would install version 2.7.7 though, 2.8.0 has just been out recently

apt-get install scala

Run the scala shell

scala

(optional) Quick upgrade to scala 2.8.0, install scala as per above and just copy the newer jars
Download scala from http://www.scala-lang.org/downloads and extract the tarball

tar xzf scala-2.8.0.final.tgz
cd scala-2.8.0.final/lib
cp scala-compiler.jar scala-library.jar scala-dbc.jar /usr/share/java


Get Started on Eclipse


Get the eclipse scala plugin http://www.scala-ide.org/ this would include the scala jar, compiler, console, etc.
When you have the plugin the following options are available

  • create a new scala project

  • right click on existing java project and add scala nature and you can now start coding both java and scala together

  • run the scala console inside eclipse



Reference and Links


Below are some useful reference

Scala Tutorial - useful w/ Java Background

Scala by Example - a little long, more like a scala cookbook

Programming Scala

First Steps to Scala - a bit old but still useful

Scala Idioms, Step 1, Lists and Maps - a bit old but quick way to learn about lists. Tuples are using old syntax of {x, y} which is now changed to (x, y)

Who is using Scala




Frameworks and OSS Projects


No comments: