Links (Wadler)

Wonder what Wadler is up to?
My latest research interest is a programming language for web application development, building on my experience with XML, Java, and Haskell.

A short introduction and a set of slides are available (both PDF).

Wonder about the language name?

A quarter of a century ago, Burstall and others at Edinburgh introduced an influential programming language, Hope, named after Hope Park Square, located near the University on the Meadows. This note proposes a research effort to design a new programming language for the web, Links, named after the Brunts-field Links, located at the other end of the the Meadows and site of the world’s first public golf course.

And here's why you should be interested in this work,

Other languages for web programming include Xtatic from Pierce, Scala from Odersky, and Xen and Cw from Microsoft. Links will benefit from fruitful interactions with these efforts. However, Links differs crucially in that it adopts database ideas from Kleisli and systems principles from Erlang, taking it well beyond the capabilities of these other languages.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Oooo can I have that now, please?

The Kleisi system (pdf) looks interesting too.

Heterogenous collections

From the paper:

Our sets, bags and lists are homogenous. In order to mix objects of different types in a set, bag or list it is necessary to inject these objects into a variant type.

I started working through the HList paper a short while ago, and while I've not got all the way through it yet I believe it offers an interesting approach to the problem of typing heterogenous collections (albeit one that reminds me eerily of some of the tricks performed by Alexandrescu with the C++ template system).

I am pleased to see that the Kleisli paper addresses the question of data exchange (and self-describing data exchange at that) without making the usual gestures of obeisance towards XML. The structures under discussion - nested bags, sets and tuples - seem similar to those Hans Reiser has been looking at. There is a drive there in a similar direction: away from layering data structures on top of some existing data model, and towards developing new (combinations of) structural primitives that can express complex and variable structures in a more tractable way.

A major event

This announcement perhaps marks one of the major events in programming language history, which go on to shape the field for decades to come. It's wonderful to see Philip Wadler at the center of this effort; he is one of the few who have the broad experience and credibility to make it a success.

I certainly hope that the Links syntax will be inspired by the C/Java/Pascal/Python school rather than Haskell, ML, Scheme, or (worse) XML. The later languages are far from mainstream programming practice and would needlessly inhibit the language's adoption by the practical folks who are its target audience.

It is certainly unrealistic to expect that a pure functional language would succeed in the mainstream. A better tradeoff is a language with monadic effects types (but retaining mainstream syntax -- not Haskell "do" notation) which enable general imperative programs to be written naturally, and the scope of their effects clearly delimited so that the language retains a powerful and usable functional core.

Perhaps I'm confused

What exactly is important about this? Is it that it's Philip Wadler? I ask because I didn't see anything in either of the PDFs that seemed new, and I'm unclear why we need yet another web-specific language.

It's a great organizational opportunity

What exactly is important about this? [...] I'm unclear why we need yet another web-specific language
That was exactly my reaction before reading the introduction. After reading it I think the main point is not yet another language, but a gravity center for Computer Science and business communities to meet.

And of course Philip Wadler is not immune to failure, if you meant that.

Actually

I had just never heard of Philip Wadler before, to my knowledge, and the poster to whom I replied made a point of saying that it was good to see him involved, so I thought that might be important. :)

Wadler

Wadler is one of the most distinquished researchers in the field, so natrually it is interesting to see what he is up to. I suggest searching the archives - his work was discussed here many times.

Or check his CV :)

Web programming still has a long way to go

Not much of it is new, but this language is a engineering project, not a research project. The ideas have been done in other languages, but they have yet to be brought together.

However, the proposal contains some stumbling blocks. For example, if you work with Erlang enough, you start to realize that it's not statically typed because of message passing. Type systems for message passing has not been adequately solved yet. Even Wadler's type-checking tool for Erlang doesn't do much with send/receive. Joe Armstrong has created UBF, which does hint at what a message-passing type system might look like.

Yes, there are many web-specific languages, but most of them are basically the same language and aren't very good. For example, PHP is sloppy and encourages bad programming practices.

If a Links program compiles, it will be guaranteed to produce well-formed and valid XML streams, and it won't be vulnerable to SQL injection attacks.

Inadequate?

Type systems for message passing has not been adequately solved yet
Does join-calculus qualify as message-passing?

If yes, then how type systems for Join, JoCaml, or Funnel are inadequate1? I guess I have to check the proposed type system for Erlang...


1? A good reference is probably this one: Implicit Typing à la ML for the join-calculus.

PS: Not all of the links may work right now because of the major storms in Europe.

> I certainly hope that the L

I certainly hope that the Links syntax will be inspired by the
> C/Java/Pascal/Python school rather than Haskell, ML, Scheme, or (worse) XML.

I honestly don't know that you'd find a Python programmer out there who would concede that their syntax belongs in the same school as C or Java's, unless you were to use threats of physical violence ;) IMHO if you believe that the reason why Haskell, ML and Scheme have remained niche items is due to their syntax then I think you're overlooking the more fundamental issues that separate these languages.

As to the announcement itself... It's pleasantly high-level, admirably inclusive, and utterly devoid of any useful detail. In general I'm afraid to say that I've become fairly cynical about the more academically / formally inclined who start spinning what they're doing to make it sound more relevant to industry. I worry when I see things like a conference about .net - I can't help but wonder if it's a genuine research opportunity or just a cynical attempt to grab money from a cash rich organization. I personally don't see what's wrong with pure research done well - not everything has to have immediate relevance to industry.

It's in the Types

a language with monadic effects types (but retaining mainstream syntax -- not Haskell "do" notation)

Although I can't cite an existing strict language that uses monads to distinguish pure code from impure, it's predictable that Links will have this combination, given Wadler's involvement and the intro's statement that it will be strict.

Monadic types steer you away from conventional syntax. Even if you drop the Haskell syntax, you still have the Haskell way of joining code together. So your core code consists of

  • name definitions
  • function definitions
  • action expressions
  • actions returning a value
Expressions with side effects can't be used as function arguments. Also, monadic types make a big distinction between Haskell's <- which names the result of an action, and the familiar use of = to update a variable. In learning functional programming, one must become comfortable with the former and limit use of the latter. In these two respects, monadic types call for their own syntax. Familiar syntax would bring the user directly to this hurdle, and not help get over it.

Related work

Here's an article presented at MOZ 2004 that tackles the same problem. It gives an integrated approach to building Web-based applications that takes advantage of the multiparadigm abilities of Oz. It presents a tool, QHTML, that is based on similar ideas to QTk (see chapter 10 of CTM). One difference with Links is that the QHTML approach stays completely within the Oz language, using Oz records to model Web pages instead of XML-like syntax.

Why it matters

Perhaps because of the presentation's vagueness, I'm reading into it what I would like it to be.

But I think it's more than that: What Wadler is looking to do is to unify queries, interaction, message passing, and HTML/XML generation into a clean, sound programming environment. These sorts of things are currently handled with a large set of ad hoc imperative languages communicating in poorly-defined ways, leading to a very error-prone system.

Aha...

Look what I found...

Check this out

If you want to learn more about Links and perhaps even influence the design.