I'm reading the prerelease of the Scala book , since I'm working for a heavily Java-invested organization now and programming in Java feels like running a race with cement shoes. Politically, Jython doesn't seem like an option; Scala might be an easier sell.
Here's some of my impressions going through the book.
Scala is a decent scripting language
[updated this section thanks to comments from anonymous, Jörn, and Eric.]
Here's how you can loop through each line in a file:
Python:
import sys
for line in open(sys.argv[0]):
print line
Scala:
import scala.io.Source
Source.fromFile(args(0)).getLines.foreach(println)
The scala interpreter also has a REPL , which is nice for experimenting.
This article has more examples of basic scripting in scala.
Getters and setters
One thing I despise in Java is the huge amount of wasted lines of code dedicated to getFoo and setFoo methods. Sure, your IDE can autogenerate thes...