Home | About | Partners | Contact Us

SourceForge Logo

Quick Links
Home
News
Status
Building XL
XL Mailing List

Understanding XL
Conceptual overview
XL examples
Inside XL
Concept Programming

In depth
Browse GIT
Bugs
SourceForge Info
Contact

Other projects
GNU Project
The Mozart Project

XLR: Extensible Language and Runtime

The art of turning ideas into code

XL as a domain-specific language

Prev: XL as a data language

Up

Next: XL as a high-performance programming language

One way to represent arbitrary concepts is to invent new languages to describe them. This led to a large number of so-called domain-specific languages or DSL. The strength and weakness of these languages is that they do not try to be universal, but rather to focus on a very specific need. It is a strength, because a DSL doesn't need to carry any baggage, and its syntax and semantics can be very well suited to the domain it covers. It is a weakness because programmers need to learn a new language for each domain (and often even the basic rules of syntax can vary significantly or subtly from language to language). There is often little visibility on the long-term support. Many programmers will be reluctant to use a third-party DSL for a commercial development.

XL takes a slightly different approach to DSL. Its built-in language extension capabilities are designed to make the creation of in-language DSL (or dialects) feasible. Adding a DSL to an XL program is similar in complexity to adding a new library for traditional languages. It doesn't require learning the basic syntax, which remain XL0 for any DSL based on XL. The Concept Programming frameworks provides good guidelines regarding the semantics of such DSL. A DSL will integrate in XL seamlessly, and be processed by the XL compiler itself, rather than require a third-party tool.

The symbolic differentiation example shows a simple DSL integrated in XL.

Prev: XL as a data language

Up

Next: XL as a high-performance programming language


Copyright 2008 Christophe de Dinechin (Blog)
E-mail: XL Mailing List (polluted by spam, unfortunately)