2 May 2006

The Links programming language

The Links programming language [ via Lambda the Ultimate ] is an experimental one-tier language that encompasses the three-tier Web model. A single Links program compiles into JavaScript to run on the client and into SQL to run on the database. Groovy, I say. Check out their short, 12-page paper [ PDF ] describing this accomplishment.

I began thinking it was amazing-yet-misguided. Existing technologies are duplicated within its syntax (e.g. XQuery), and toy programs--though mandatory as communicative examples--necessarily avoid the pitfalls of scale. However, I'm beginning to think that I'm just prejudiced by the ubiquity and expressiveness of SQL, and maybe holding too tightly to the opinion that the current domain languages are separate because they must live in separate domains. Just because JavaScript exists on the client should we have to write to it? Maybe flattening can also simplify, and maybe Links is appropriate as sort of a 4GL Web language that sits atop several, grainier languages.

But then, what of the nightmare of HTML embedded in PHP, Servlets, et al.? Don't maintenance issues appear when hasty design flattens the different domains? What about the ideal: separation of layout (CSS), static structure (HTML), client logic (JavaScript), dynamic content (JSP script), and data management (SQL)? That separation exists for the similar reason that we create small methods, classes, and files: modules should only do one thing. The reason that Links seems like a natural progression is that we can so often blur the interface between the different domains. Is that blurring a hint that a single-tiered language is the answer, or simply the artifacts of ideas sketched quickly but not yet complete?

[ posted by sstrader on 2 May 2006 at 11:13:47 PM in Programming ]