Online / 6 & 7 February 2021

visit

Making a simple language is complicated

Humans are so illogical


XL is a minimalistic, yet powerful programming language presented last year at FOSDEM. Keeping the language both simple and powerful is an extremely interesting challenge. In this talk, I will show problems that XL exposed over time, and contrast the solutions being proposed with what is common in mainstream programming languages.

XL is a programming language with an homoiconic representation of programs using 8 node types. There is only one fundamental operator describing parse tree rewrites. This design allows this very minimalist language to read like a relatively normal programming language, while offering very powerful Lisp-like meta-programming capabilities.

Unlike Lisp, however, the design of XL is guided by an approach called "concept programming", which focuses on the process of turning ideas into code. This means that it is a core objective to make the code "look like" and "behave like" the ideas it represents. But keeping things simple for us humans turns out to be extremely complicated for a computer.

The purpose of this talk is to share some of the insights gained with XL, in the area of syntax, semantics and code generation, with the hope that it will be useful to people working on other languages as well. The discussion will be based on five simple examples:

  1. numbers, expressions, statements and other program structures
  2. minimum, maximum and other non-objects
  3. lists, arrays and other containers
  4. text formatting and other I/Os
  5. complex numbers and other data types

In each case, we will deep-dive, starting with the limitations of mainstream languages and give examples of subtle bugs caused by these limitations. We will then explore the approach XL takes to solve some of these issues, which is often, comparatively, extremely simple and minimalist.

Speakers

Photo of Christophe de Dinechin Christophe de Dinechin

Links