Lili, The Language

Datatypes

Describing and understanding Lili's datatype hierarchy is much easier than doing the same for Common Lisp.
The type relations in Lili are subject to a simple tree-hierarchy:

There is one fact which hurts the tree-character of the type-graph: The pseudo-datatype List has the symbol nil and all
conses as extension. nil itself is the empty list, an atomic symbol and stands for the truth value false.

Symbols

Symbols roughly correspond to variable names in imperative languages. A symbol is represented by any concatenation
of characters excluding space. Examples for symbols are:

Symbol naming is case-sensitive in Lili.
The value of a symbol is the value it has most recently been bound to in the environment.

Numbers

Numbers are syntactically represented as they are. Examples for 64-bit Integers are:

Some examples for 64-bit Real Numbers: Numbers evaluate to themselves. There do not exist any unlimited precision numeric types or a type for complex numbers
until now. At least a complex type will be added in the near future.

Characters

Characters are syntactically represented by a "#\" followed by the character to encode. Examples are:

Characters evaluate to themselves.

Strings

Strings are syntactically represented by putting them between quotation marks. Strings are immutable in Lili.
Examples are:

Strings evaluate to themselves.

Servers

The Server datatype is designed to be used with the http-client built-in functions http-get and http-post. A server has
4 fields: An IPv4 address, a port number, a relative file descriptor, and a description of the server. It is represented
according to the following pattern: $SERVER(IPV4-address:PORT:FILE_DESCRIPTOR$DESCRIPTION). Examples are:

Servers evaluate to themselves.

Cons

A Cons has two data fields. CAR (head) and CDR (tail). The head can be any SExpression, the head must be of
type List (-> a Cons or nil). This implies there do not exist dotted pairs in Lili. You can dynamically create lists by
consing (e.g. (cons 1 (cons (2 (cons 3 nil)))) ). For static list definitions you should use the abbreviated
syntax: (e1 e2 ... en) for all elements ei with 0< i <= n (e.g. (1 2 3) ... see image. ).






The list (1 2 3) represented by linked conses

To understand how conses are evaluated you should read the definition of the evaluation routine.

Structures