HOP
A multitier web programming language from INRIA in which the server side and the client side of a web application are written as a single program in a single language - originally a Scheme dialect, later extended to JavaScript as Hop.js.
Created by Manuel Serrano, at INRIA Sophia Antipolis. The founding DLS 2006 paper, "Hop, a Language for Programming the Web 2.0", is credited to Manuel Serrano, Erick Gallesio and Florian Loitsch; Serrano is the project lead and the author of Bigloo, the Scheme compiler Hop is built on. Vincent Prunet co-authored the 2016 Hop.js paper, and Gerard Berry co-designed the HipHop reactive layer with Serrano and Cyprien Nicolas
HOP is a programming language for the web whose central claim is deceptively simple: a web application should be one program. Not a server program in one language talking over HTTP to a client program in another language, glued together by hand-written serialisation, URL routing and a pile of configuration - but a single source file, in a single language, with a single scope, in which the code that runs in the browser and the code that runs on the server can call each other and share values as naturally as two functions in the same module.
Languages built on that idea are called multitier or tierless languages, and Hop, first presented in 2006 by Manuel Serrano and colleagues at INRIA Sophia Antipolis, is one of the two canonical early examples - the other being Links from Edinburgh. Hop began as a dialect of Scheme. Around a decade later the same team rebuilt the same design on top of JavaScript and called it Hop.js. Both incarnations answer the same question, and both are still, twenty years on, unusually clear statements of an idea that mainstream web development has only partially absorbed.
History and origins
Hop came out of the Bigloo world. Manuel Serrano is the author of Bigloo, a Scheme compiler that generates C, JVM bytecode and .NET code, and Hop was built as a Bigloo application: a web server, a compiler and a runtime library written in Scheme, distributed together as what the 2006 papers called a development kit.
The founding paper, “Hop, a Language for Programming the Web 2.0” by Serrano, Erick Gallesio and Florian Loitsch, was presented at the First Dynamic Languages Symposium in Portland, Oregon, in October 2006. Its diagnosis of the state of web programming is worth restating, because it has aged well: writing a rich web application at the time meant mastering a stack of unrelated technologies - HTML for structure, CSS for presentation, JavaScript for interaction, some server language for logic, SQL for storage, XML for transport - each with its own syntax, type discipline and error model, none of which the others could see into. The paper’s response was to treat HTML, CSS and JavaScript not as languages the programmer writes but as assembly languages the compiler emits.
Gallesio, a co-author, was already the author of STklos and of earlier Scheme-plus-GUI work; Loitsch went on to write scheme2js, the compiler that translates Hop’s client-side code into JavaScript, described in “Hop Client-Side Compilation” at TFP 2007. The pieces were, in other words, largely in place before the idea was: a good Scheme compiler, a Scheme-to-JavaScript compiler, and a working HTTP server.
Design philosophy: the stratified program
The distinctive mechanism in Hop is syntactic stratification. A Hop program has two strata. The main stratum executes on the server. The GUI stratum executes in the browser. Ordinary Scheme code is in the main stratum; the tilde escape ~ opens a client-stratum expression; inside that, the dollar escape $ drops back out to evaluate a server-side expression and splice the resulting value in.
| |
Two things are happening here that are worth separating. First, <HTML>, <BODY> and <BUTTON> are ordinary functions - HTML elements are first-class values in Hop, constructed, passed around and returned like any other data structure, not assembled by string concatenation or by a template engine. Second, the ~(...) block is a value too: a piece of client-side program that the server-side program is computing, into which the server has interpolated its own name variable via $. The compiler works out what must be serialised and how, and the developer never writes an endpoint, a fetch call or a JSON schema.
The complementary construct is the service. define-service binds a function to a URL. From the client stratum, calling that service - historically via with-hop, later with promise-based syntax - performs an asynchronous remote call that looks, at the source level, close to an ordinary function call. Server-to-client and client-to-server communication are both first-class, and both directions are supported, which is why the project’s own literature describes Hop as bidirectional rather than merely as a way of generating client code.
Key features
| Feature | What it means in practice |
|---|---|
| Multitier source | Server and client code live in one file, one language, one lexical scope |
| Stratified syntax | ~ enters the client stratum, $ escapes back to the server stratum |
| First-class HTML | Markup elements are functions returning values, composable like any data |
| Services | define-service binds a function to a URL; remote calls look like calls |
| Two execution modes | Server code runs as natively compiled Bigloo code or interpreted; client code is compiled to JavaScript |
| Full Scheme underneath | R5RS plus modules, objects, exceptions, threads and a large library |
| Integrated web server | Hop is the server - there is no separate container to deploy into |
| Reactive layer | HipHop adds Esterel-style synchronous concurrency and preemption |
The last point deserves emphasis, because it is where Hop went somewhere genuinely unusual. In 2011 Gerard Berry - the designer of Esterel and a central figure in synchronous-language research - joined Serrano and Cyprien Nicolas to build HipHop, an orchestration layer for Hop. The observation behind it is that the hard part of a rich web interface is not rendering but time: sequences, timeouts, aborts, “do this until that happens, then switch modes”. Callbacks and promises express these badly. Esterel, designed for avionics and embedded control, expresses them precisely. HipHop, and later HipHop.js, brought that discipline into web and IoT programming, and the work reached PLDI in 2020.
Evolution: from Scheme to JavaScript
Hop’s version history divides cleanly in two.
The 1.x and 2.x lines (2006 to 2014) are Scheme. The INRIA release archive shows a rapid cadence through the 1.x series to around 2009, then 2.0.0 in 2010, the 2.1 through 2.3 series across 2010 to 2012, and 2.4.2 in September 2013 - conventionally cited as the last stable release of the Scheme-only Hop, with a 2.5 series reportedly following in 2014.
The 3.x line is JavaScript-first. The public GitHub repository, opened in August 2015, describes the project simply as “Multitier JavaScript”. The surface language, HopScript, applies the same stratification to JavaScript syntax: service declarations, ~{...} for client code, ${...} for server escapes. “A Glimpse of Hopjs”, presented by Serrano and Prunet at ICFP 2016, is the reference description, covering the Node.js-compatible runtime, server-side parallelism, and the JavaScript and HTML compilers. Releases continue at a research pace, with the 3.3.x line appearing around 2020, 3.4.x around 2021, and 3.7.0 reportedly published with a tarball dated September 2025.
Alongside this sits hopc, Hop’s ahead-of-time JavaScript compiler, the subject of Serrano’s ICFP 2021 paper “Of JavaScript AOT Compilation Performance”. The paper’s argument is that static compilation can be competitive with just-in-time engines for a meaningful class of JavaScript programs - a claim about a specific compiler on a specific benchmark suite, and one worth reading in the original rather than reducing to a number. No general “Hop is faster than Node” claim should be drawn from it.
Getting it running
Hop is a build-from-source system. The native version targets Linux and macOS according to its own installation notes, and requires a C compiler such as GCC or Clang, a matching version of Bigloo, GNU Make, the autotools, and OpenSSL, with optional support for GMP, SQLite and Phidgets hardware detected at configure time:
| |
A JavaScript-only installation is available through npm from the author’s own package archive rather than the public npm registry:
| |
There is no official Docker Hub image. The source distribution ships its own Dockerfiles - hop-3.7.0.dockerfile sits beside the release tarball on the INRIA FTP archive, and the repository contains a docker directory - so containerised use means building the image yourself. One disambiguation is worth stating plainly: the widely pulled apache/hop images on Docker Hub are Apache Hop, a data-orchestration and ETL platform with no relationship whatsoever to this language.
Hop is distributed under the GNU General Public License version 2 or later, with a separate academic licence file; the source headers carry an INRIA copyright dating back to 2006.
Current relevance
Hop occupies an honest and slightly melancholy position. As software, it is a research system: development has continued in public into 2026, but there is no release cadence, no package ecosystem to speak of, and the hop.inria.fr documentation site - the canonical reference for years - has become unreliable. Anyone approaching Hop today should expect to build from source and read papers rather than tutorials. Calling it dormant overstates the case; calling it maintained in the way a production stack is maintained would overstate it in the other direction.
As an idea, it did rather better than the software. The multitier argument has been re-derived repeatedly by people who mostly did not know Hop existed: Meteor’s isomorphic JavaScript, Elm and PureScript’s shared-language ambitions, GWT compiling Java to the browser, Blazor doing the same for C#, Phoenix LiveView keeping state on the server, and - most directly - React Server Components, whose 'use client' and 'use server' directives are, structurally, Hop’s ~ and $ with a different spelling and two decades of intervening industrial pressure. The research lineage acknowledges the debt more explicitly: work on tierless programming in ML, Haskell and other settings routinely positions itself relative to Hop and Links.
Why it matters
Three things make Hop worth knowing.
It named the problem early and precisely. In 2006, the diagnosis that web development had become the assembly of five mutually unintelligible languages was less obvious than it now sounds, and the prescription - make the browser a compilation target, not a programming environment - was genuinely radical.
It showed the design could be small. Hop’s stratification is essentially two escape characters. It requires no new type system, no new runtime model, no framework. That economy is the strongest evidence that tierless programming is a language feature rather than an architecture, and it is the reason the design ported so cleanly from Scheme to JavaScript a decade later.
It connected web programming to synchronous languages. The HipHop line is Hop’s most original contribution and the least imitated. Bringing Esterel’s model of time into the browser is an idea that has still not been absorbed by the mainstream, and it remains the most interesting reason to read the Hop papers today.
Hop never won adoption. But almost every modern framework that lets you write one program for two tiers is, whether it knows it or not, arguing for a position that Hop stated first and stated more clearly.
Timeline
Notable Uses & Legacy
INRIA research on multitier and reactive web programming
Hop's principal use has always been as the vehicle for its own research programme at INRIA's Indes/Sophia Antipolis team. It is the substrate for HipHop and HipHop.js, for work on multitier debugging, on client-side and ahead-of-time compilation of JavaScript, and on the security of tierless programs - a line of publications running from DLS 2006 through PLDI 2020 and ICFP 2021
HipHop.js orchestration of web and IoT behaviour
HipHop.js embeds Esterel-style synchronous concurrency and preemption into Hop.js, targeting the temporal logic of complex web interfaces and Internet-of-Things controllers - the cases where callbacks and promises become hard to reason about. It is the most substantial system built on top of Hop and is distributed as its own package
Hardware and sensor control
Hop's build system has long included optional support for Phidgets hardware sensors and actuators, and the project has reportedly shipped Android and Linux distribution packaging alongside some of its source releases. This reflects a deliberate positioning of Hop as a runtime for small networked devices, not only for browser-facing applications
The multitier programming research lineage
Hop, alongside Links from the University of Edinburgh, is routinely cited as one of the two earliest multitier - or "tierless" - programming languages, and later work on tierless web programming in ML, Haskell and other settings positions itself explicitly against it. Its clearest legacy is as the reference point for an idea rather than as a deployed production stack
Authoring and presentation tools by its own authors
Serrano has used Hop to build practical tools including HopTeX, reportedly presented at a Scheme workshop around 2011, which renders LaTeX documents through Hop, and hopimpress, a presentation package distributed through the project's own package archive. These are small, but they are among the few Hop programs with a life outside the papers