XL is an extensible programming language, designed to grow with Moore's law instead of being killed by it. Extensible means that programmers can add features and notations much like they would add functions or classes in existing languages. The mechanisms are based on meta-programming, and are a bit similar to the macros that gave Lisp its longevity, but with interesting twists. As a proof of this extensibility, basic arithmetic (addition, multiplication, etc) or control statements (if-then-else, loops, etc) are implemented by libraries in XL, yet offer similar performance and usability as built-in features in C++. Another validation of the extensibility is Tao3D, an XL-based interactive graphic language that will be used to give the presentation.
Every 5 year or so, a major paradigm arrives, that makes earlier languages obsolete. Past examples include object-oriented programming, distributed programming or application extension languages. The inability of classical programming languages to integrate such changes also leads to a number of niche languages implementing minority paradigms, ranging from Prolog to make to yaml.
Extensible in XL means that programmers can add features and notations much like they would add functions or classes in existing languages. XL is quite minimalist, since all this is done using a single operator written "is".
This operator can be used to define variable (X is 0
), functions (is_even X is X mod 2 = 0
), multi-operator expressions (X in Y..Z is X >= Y and X < Z
), or programming constructs. Loops are defined in XL as follows:
loop Body is
Body
loop Body
This extensibility mechanisms is therefore based on meta-programming, and are in that way similar to the macros that gave Lisp its longevity. Lisp was first to normalize object-oriented programming with CLOS. But XL has interesting twists.
For starters, there is a strong focus on making notations match concepts. For example, XL will let you write (1 + 2 * 3
) or program if
statements that look exactly like in other languages. This is actually important.
This talk will give three proofs of this extensibility:
The standard library of XL provides things that have to be put in the compiler in other languages, like basic arithmetic (addition, multiplication, etc), basic control statements (if-then-else, while loops, etc), the module system, and so on. The compiler is actually in the library (or rather, it will be, one day).
The Tao3D language turned XL into a functional reactive 3D document description language. That would have been a stretch for C, and maybe even for Lisp, for reasons that will be discussed.
ELIoT, later renamed ELFE, and now integrated in trunk XL, turned XL into a distributed language, where you write one program and it executes on several machines, dispatching code around and exchanging data transparently.
Tao3D will be used to give the presentation, to give an idea of what XL is (or rather was) capable of.
The language is currently being redefined in a more precise way, including a fully revamped type system. You can access the work-in-progress definition here: https://c3d.github.io/xl/ (also in links).
Speakers: Christophe de Dinechin