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:

    Man acts as though he were the shaper and master of language, while in fact language remains the master of man.
    Martin Heidegger (1889–1976)

    You can’t write about people out of textbooks, and you can’t use jargon. You have to speak clearly and simply and purely in a language that a six-year-old child can understand; and yet have the meanings and the overtones of language, and the implications, that appeal to the highest intelligence.
    Katherine Anne Porter (1890–1980)

    We find that the child who does not yet have language at his command, the child under two and a half, will be able to cooperate with our education if we go easy on the “blocking” techniques, the outright prohibitions, the “no’s” and go heavy on “substitution” techniques, that is, the redirection or certain impulses and the offering of substitute satisfactions.
    Selma H. Fraiberg (20th century)