*** Welcome to piglix ***

XL Programming Language

XL
Paradigm Multi-paradigm, Concept-oriented, imperative, functional
Designed by Christophe de Dinechin
Developer Christophe de Dinechin
First appeared 2000
Stable release
0.1 / February 2010; 7 years ago (2010-02)
Typing discipline strong
OS Unix-like
License GPLv2
Website xlr.sf.net
Influenced by
Ada, C++

XL stands for eXtensible Language. It is the first and so far the only computer programming language designed to support concept programming.

XL features programmer-reconfigurable syntax and semantics. Compiler plug-ins can be used to add new features to the language. A base set of plug-ins implements a relatively standard imperative language. Programmers can write their own plug-ins to implement application-specific notations, such as symbolic differentiation, which can then be used as readily as built-in language features.

XL is defined at four different levels:

XL has no primitive types nor keywords. All useful operators and data types, like integers or addition, are defined in the standard library (XL2). XL1 is portable between different execution environments. There is no such guarantee for XL2: if a particular CPU does not implement floating-point multiplication, the corresponding operator definition may be missing from the standard library, and using a floating-point multiply may result in a compile-time error.

The Hello World program in XL looks like the following:

An alternative form in a style more suitable for large-scale programs would be:

A recursive implementation of factorial in XLR looks like the following:

Syntax is defined at the XL0 level. The XL0 phase of the compiler can be configured using a syntax description file, where properties like the text representation and precedence of operators are defined. A basic syntax file defines common mathematical notations, like + for addition, with the usually accepted order of operations.

The parse tree consists of 7 node types, 4 leaf node types (integer, real, text and symbol) and 3 internal node types (infix, prefix and block).

With the default syntax file, the following is valid XL0, irrespective of any semantics.


...
Wikipedia

...