First off, Microsoft did a great job with this conference, and kudos to Mads Torgersen who organized it. They invited interesting speakers from all over the world. Even some PL professors from the local University of Washington left their ivory tower and came to listen to some talks. A variety of languages and new features were discussed.
The two topics that stood out were: functional programming and DSLs. It seems like every language tries to assimilate some functional elements in order to deal with parallelism. Still, the problem is that in most languages the added safety features for concurrency are not enforceable and don’t compose well. A compiler can potentially check whether a lambda passed to a parallel loop doesn’t modify shared state, but it can’t extend this check to functions called from that lambda. The solution would be an effect system, which includes side effects of a function in its signature, but effect systems are extremely hard to program with. Compare this with Haskell monads, which serve as a simple but safe effect system. Unfortunately many imperative programmers have fits when they hear the M word. (I remember C programmers having the same reaction to the word “object.”)
Martin Odersky, the creator of Scala described an ingenious macro system for Scala. The macros work on AST trees that can be manipulated programmatically. Kunle Olokotun from Stanford described an EDSL system written in Scala that is used for highly optimized parallel computations.
Robert Griesemer from Google presented the go language. It’s a nice idea to have a simple minimalistic general purpose language (they don’t call it a systems language any more). It’s harder to keep it simple forever. We’ve seen many languages that started simple only to cave in later, under demands from users, to explode in a cornucopia of features. I fear the same fate awaits go. Generics will come first, then the community will realize that go’s concurrency model is not general enough, and so on. Soon we’ll have go++.
As a confirmation of this trend, John Rose from Oracle presented language extensions in Java 8. Not surprisingly, among them was support for lambdas — another sign of functional programming going mainstream.
Speaking of functional programming, Andy Adams-Moran had a presentation about the Haskell work they do at Galois. They specialize in high-assurance software and do a lot of business with the Government. Andy showed amazing feats of Haskell engineering. They were able to port the Haskell compiler and runtime to bare Xen, bypassing Linux. They even wrote their own drivers in Haskell. Low-level and high performance are not epithets normally associated with Haskell. (And yes, they used monads.)
Microsoft had their own talks, quite interesting although more product oriented. They talked about the Power Shell, a scripting language for Windows 8. F# had some interesting extensions (described by Donna Malayeri) that let the programmer, during program development, connect to a web site and download the schema, turn it into F# types, and plug them into Visual Studio intellisense. There was also a talk by Martyn Lovell about the new Windows Runtime that, in some sense, reverted to COM for its API. I’m not sure if that means that the Frankenstein of C++/CLI can finally be put to rest.
The especially interesting Microsoft talk was about support for asynchronous programming in C# and VB. The speaker was Mads Torgersen, the organizer of the conference. Mads described a coroutine-style programming model where you can block in any part of your code using await and, when an event is triggered, resume execution right where you stopped. In the meanwhile, your program can continue executing other code — on the same thread. (You might recognize here a continuation monad in disguise.) This is a perfect model for GUI applications that call asynchronous operations. I talked to Herb Sutter about it later and he said that a very similar thing is being proposed for C++ (I’m going to be on the C++ sub-committee for parallelism with him, and I’ll report more details).
Herb also had a talk about C++11 and how different it feels from the previous versions. For me the really big deal is move semantics that tips the scales from passing by reference to passing by value — where passing by value is really passing by reference behind the scenes.
Another split was between native and managed languages, but nobody could agree on the definitions. When does a native language with a big runtime become a managed language, and a managed language with a JIT compiler become a native language? Herb Sutter tried to marry these two approaches, but he chose a curious metaphor — native programmers are from Mars and managed programmers are from Venus. I don’t think a lot of managed programmers were happy with that comparison. From where I sat it looked more like native programmers were distributing assault rifles to the programming public, trusting they won’t shoot themselves in the foot; while managed programmers were trying to enforce some kind of gun laws.
There were many new (at least to me) interesting languages and DSLs. Among them was Grace, Bloom, Julia, R, and others. You should look them up if you’re interested.
There were two talks about the D language by Walter Bright and Andrei Alexandrescu. There was some interest in D’s pure functions which, together with immutability, could form a platform for safer concurrency (purity propagates in a way not dissimilar to an effect system). D could become a player in that area, if only Andrei were not so stubborn and listen to me😉.
Videos of presentations will be available on Lang.NEXT web site.