The Links Programming Language

9 min read Original article ↗

About Links

Links is a functional programming language designed to make web programming easier.

Links eases building interactive web applications with significant client- and server-side components.

A typical, modern web program involves many "tiers": part of the program runs in the web browser, part runs on a web server, and part runs in back-end systems such as a relational database. To create such a program, the programmer must master a myriad of languages: the logic may be written in Java; the presentation in HTML and CSS; the GUI behavior in Javascript; and the queries in SQL. There is no easy way to link these, for example, to be sure that an HTML form or an SQL query produces the type of data that the Java code expects. This problem is called the impedance mismatch problem.

Links eases the impedance mismatch problem by providing a single language for all three tiers. The system generates code for each tier; for instance, translating some code into JavaScript for the browser, some into a bytecode for the server, and some into SQL for the database.

Links incorporates proven ideas from other programming languages: database-query support from Kleisli, web-interaction proposals from Racket, and distributed-computing support from Erlang. On top of this, it adds new web-centric features of its own.

The initial Links development effort was funded by EPSRC grant EP/D046769/1 from 2005-2009. In 2014 development on Links resumed with a focus on adding session types to Links, funded by EPSRC Programme Grant "From Data Types to Session Types: A Basis for Concurrency and Distribution" (EP/K034413/1). Other active areas of research which are driving Links development include work on adding algebraic effects and effect handlers to Links (UKRI Future Leaders Fellowship EHOP, grant number MR/T043830/1) and the Skye project, which builds on Links to support scientific data curation (funded by the European Research Council, grant number 682315).

Publications

Grants

Core team

Alumni

The links team
The Links team on Arthur's Seat: Philip Wadler, Jeremy Yallop, Sam Lindley, Ezra Cooper. (Nov 2006)

Visitors

Undergraduate projects

MSc Projects

Interns

  • Yi Zhou, June–July 2022. Yi implemented several benchmark programs for Links, extended the command-line interface of Links, and tweaked the internal handling of file paths.
  • Robin Jourde, May–July 2022. Robin extended Links with effect aliases, first-class operation polymorphism, and fresh operation label generation.
  • Dee Yeum, July–August 2021. Dee worked on headless testing of client-side Links applications.
  • Samo Novak, June–August 2021. Samo implemented a round-trip type pretty printer, whose outputs can be successfully parsed by the Links parser.
  • Yueyang Tang, May–August 2020. Yueyang worked on improvements to Links, including dramatically speeding up serialization of large query expressions and supporting function definitions by case analysis
  • Jonathan Coates, June–July 2019. Jonathan worked on the Links codebase. He implemented support for first-class polymorphism, syntactic sugar for effects, and fixed numerous bugs.
  • Tom Davey, June–July 2019. Tom adapted TryLinks for use with Jupyter Notebook.
  • Arek Mikolajczak, June–August 2018. Arek worked on TryLinks.
  • Nicole Meng, June–July 2018. Nicole worked on implementing the essence of React in Links using effect handlers.
  • Thomas Weber, May–October 2017. Thomas worked on uselets, a new abstraction for UI programming in Links, and made several contributions including a cleanup of the JavaScript runtime code, a redesign of this home page, and the Links logo. He also developed the Uselets library and examples.
  • Jake Browning, Summer 2017. Jake implemented a reactive programming library for Links inspired by Elm.
  • Sára Decova, Summer 2017. Sára implemented a collection of Links applications making use of session types in the presence of distribution and failure.
  • Victor Dumitrescu, Summer 2015. Victor worked on applications of session types in Links.
  • Austėja Elvina Brasiūnaitė, Summer 2014. Elvina helped us to develop session types in Links by building and testing lots of examples.
  • Dariusz Jędrzejczak, Summer 2014. Dariusz significantly speeded up JavaScript compilation in Links and built and evaluated the performance of a number of games written in Links.
  • Gabriel Radanne, Summer 2012. Gabriel extended the Links to OCaml compiler developed by Steven Holmes to handle database queries.
  • Thierry Martinez, Mar–Aug 2006. Thierry experimented with approaches to statically typing XML in Links.

Security

Talks