Scala example for accessing Ehcache Server

A few months ago I was chatting to Brad Clow about the new Ehcache Server. I asked him for an example with Scala. Anyway he just got back to me with what is the smallest program yet for accessing RESTful Ehcache Server.
In a file named ExampleScalaGet.scala:

run it with:
scala -e ExampleScalaGet
The program outputs:
Say goodnight,


If you are on a Mac the easiest way to get scale installed is “sudo port install scala”.
The Scala program ways in at 6 lines. Now, let’s compare it’s tersity with the other languages, all doing a GET and printing the result (See for the examples). Whitespace lines are not included.
Scala 6 lines, using
PHP 6 lines, using curl lib
Python 3 lines, using urllib2
Ruby 6 lines, using open-uri
Java 19 lines, using, which does a few things before it gives the InputStream as used in the Scala example.
Thanks to Brad for rounding out the examples.
Scala looks very interesting.
Comparing it with the others:
Brad has also blogged about his Scala example here: