Scala, EJB and real language engineering
Recently there is this battle around Scala going on: sceptical opinions are raised by some people claiming Scala is too complex, hard to learn, tools being suboptimal and generally, not delivering on the advertised productivity improvements. The discussions got started by
this article and continues with
this one.
Now, I am not the person to judge this stuff. I do think Java needs improvement, I like many of Scala's ideas, but I do realize it is a powerful, complex language.
Scala people typically say that there are two distinct roles of Scala users: library authors and library users. And only the library authors need to deal with Scala's advanced and complex type system (which is the source of many of the reported complexity problems). Critics say that the complexity "shines through" even to library users.
I have been working a lot on language design and implementation, in the context of DSLs. More recently, with the
mbeddr.com project, I have dealt a lot with C and extensions to it. We're doing this based on the MPS language workbench. Using a language workbench really distinguishes between language designer/implementor and language user. Instead of implementing interesting new features via meta programming, flexible syntax and type system magic, one can simply implement language extensions, using real language engineering techniques. And the user really doesn't see any of this: the extension feels absolutely like a real language extension.
While I realize that there are issues with this approach as well (actually, there's only one issue: you have to use MPS to write code) I think the approach is much much better in general. Let's face it: many of the things done in Scala libraries are, from a user's perspective, language extensions. But in Scala, the IDE doesn't know about them, and some of the implementation complexity does shine through. I think that, if we do language extension, we should do it with the right tools.
PS: There isn't just MPS. You can do many of these things with SDF/Spoofax or Rascal as well.