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:

    There is no such thing as a language, not if a language is anything like what many philosophers and linguists have supposed. There is therefore no such thing to be learned, mastered, or born with. We must give up the idea of a clearly defined shared structure which language-users acquire and then apply to cases.
    Donald Davidson (b. 1917)

    My God! The English language is a form of communication! Conversation isn’t just crossfire where you shoot and get shot at! Where you’ve got to duck for your life and aim to kill! Words aren’t only bombs and bullets—no, they’re little gifts, containing meanings!
    Philip Roth (b. 1933)

    Language makes it possible for a child to incorporate his parents’ verbal prohibitions, to make them part of himself....We don’t speak of a conscience yet in the child who is just acquiring language, but we can see very clearly how language plays an indispensable role in the formation of conscience. In fact, the moral achievement of man, the whole complex of factors that go into the organization of conscience is very largely based upon language.
    Selma H. Fraiberg (20th century)