

Programming in Scala - (Beta Book from Artima) - raju
http://www.artima.com/shop/forsale

======
henning
Scala's Java compatibility is pretty nice. Just realize that using an
imperative language's libraries when you're programming in a functional style
doesn't lead to beautiful code. The whole rigamarole of

    
    
        val blah = new SomeLameJavaClass
        blah setSomething ...
        blah setSomethingElse ...
        blah yetMoreFuckingSettersUgh ...
    

stands out like a sore thumb in code where you're otherwise using a clean
functional style.

~~~
shankys
Scala has some very nice features for making Java's libraries much nicer to
deal with. The most useful are probably implicit definitions and parameters,
operators (any method may be used as an infix or postfix operator), and target
typing. You can often "Scalify" a library using these features. See [1] and
[2] to see what I mean. These features are also great for creating DSLs.

The recent Scala 2.6 compiler brought some other niceties like structural
types (imagine duck typing with a static type system), existential types, and
lazy values.

All in all, I've been thoroughly impressed with Scala.

[1] Pimp my Library:
<http://www.artima.com/weblogs/viewpost.jsp?thread=179766>

[2] Simplifying JDBC: <http://scala.sygneca.com/code/simplifying-jdbc>

~~~
henning
Yes, you definitely can Scalify things. But having to write boilerplate
facades for every library you want to use in a nice way significantly
diminishes the utility of Java compatibility.

I meant to say that this is one of the biggest drawbacks of using Scala (along
with slightly immature docs). It has an excellent design; it feels like a much
bigger language than Java, yet the Scala spec is a fraction of Java's. It is
overall an extremely nice thing.

