From ERH's Cafe au Lait:
So apparently Sun has decided to add closures to Java 7. They will, of course, not remove anything to make room, so Java just gets bigger and bulkier. They will also give us a half-hearted implementation that removes some interesting pieces that would make it backwards incompatible, so we're getting really aren't closures after all. Did Sun learn nothing from the generics debacle?
Most tellingly, despite all the talk of openness, this seems to very much be Sun's decision. There's no proposal in the JCP, and all discussion of this seems to have purely been internal to Sun. If you aren't eating lunch in the Sun cafeteria, you don't get to chime in. Sun simply presented the decision as a fait accompli to the community. First they decided they wouldn't do closures in Java 7; then they decided they would; and now they'll decide how and when. Scala's looking more attractive by the hour.
I am really impressed by Scala, though I have not used it on any real projects yet. Apart from reflection, it seems to be much stronger than Java in all the kinds of features that are good for XML document processing: co-routines, pattern matching and so on. The built-in XML tree that documents can be parsed in to does not contain back pointers, so up-going axes require extra coding; Scala is obviously more congenial for OmniMark or XSLT programmers than Java. Some of Scala is not well explained in the online documentation: the
case enumerations for example: it seems that the purpose of this is to allow a compiler to complain when a switch is missing a case (very cool!)
My view of the continuation/closure debates is that they run the risk of substituting abstractions for features, to some extent. I don't want continuations per se, I don't want closures per se, I want coroutines or semi-coroutines.
And I want to be able to express them in a really direct processy way (UNIX shell pipes | comes to mind) not through some computer sciency abstraction. (I'd say the same issue arises with the way people talk about monoids in Scala: to some extent the purpose of a programming language should be to shield the programmer from the underlying abstractions, the user of a regex pattern matcher wants to match some characters, they should not need more than cursory knowledge of formal grammar theory in order to do so!)