XL (programming Language) - Language

Language

XL is defined at four different levels:

  • XL0 defines how an input text is transformed into a parse tree.
  • XL1 defines a base language with features comparable to C++
  • XL2 defines the standard library, which includes common data types and operators.
  • XLR defines a dynamic runtime for XL based on XL0

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:

use XL.TEXT_IO WriteLn "Hello World"

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

import IO = XL.TEXT_IO IO.WriteLn "Hello World"

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

0! -> 1 N! -> N * (N-1)!

Read more about this topic:  XL (programming Language)

Famous quotes containing the word language:

    If fancy then
    Unequal fails beneath the pleasing task,
    Ah, what shall language do?
    James Thomson (1700–1748)

    Play for young children is not recreation activity,... It is not leisure-time activity nor escape activity.... Play is thinking time for young children. It is language time. Problem-solving time. It is memory time, planning time, investigating time. It is organization-of-ideas time, when the young child uses his mind and body and his social skills and all his powers in response to the stimuli he has met.
    James L. Hymes, Jr. (20th century)

    Men sometimes speak as if the study of the classics would at length make way for more modern and practical studies; but the adventurous student will always study classics, in whatever language they may be written and however ancient they may be. For what are the classics but the noblest recorded thoughts of man?... We might as well omit to study Nature because she is old.
    Henry David Thoreau (1817–1862)