7 Conventions

This section defines the conventions employed in this text, how definitions will be laid out, the typefaces to be used, the meta-language used in descriptions and the naming conventions. A later section (8) contains definitions of the terms used in this text.

A standard function denotes an immutable top-lexical binding of the defined name. All the definitions in this text are bindings in some module except for the special form operators, which have no definition anywhere. All bindings and all the special form operators can be renamed.

NOTE 1 A description making mention of “an x” where “x” is the name a class usually means “an instance of <x>”.

Frequently, a class-descriptive name will be used in the argument list of a function description to indicate a restriction on the domain to which that argument belongs. In the case of a function, it is an error to call it with a value outside the specified domain. A generic function can be defined with a particular domain and/or range. In this case, any new methods must respect the domain and/or range of the generic function to which they are to be attached. The use of a class-descriptive name in the context of a generic function definition defines the intention of the definition, and is not necessarily a policed restriction.

The result-class of an operation, except in one case, refers to a primitive or a defined class described in this definition. The exception is for predicates. Predicates are defined to return either the empty list—written ()—representing the boolean value false, or any value other than (), representing true.

7.1 Layout and Typography

Both layout and fonts are used to help in the description of EU LISP. A language element is defined as an entry with its name as the heading of a clause, coupled with its classification. The syntax notation used is based on that described in [ISO/IEC 9899:1999] with modifications to support the specification of a return type and to improve clarity. Syntactic categories (non-terminals) are indicated by italic type, and literal words and characters (terminals) by constant width type. A colon (:) following a non-terminal introduces its definition. Alternative definitions are listed on separate lines, except when prefaced by the words “one of”. An optional symbol is indicated by the subscript “opt”, a list of zero or more occurrences of a symbol are indicated by the superscript “*”, and a list of one or more occurrences of a symbol are indicated by the superscript “+”. Examples of several kinds of entry are now given. Some subsections of entries are optional and are only given where it is felt necessary.
7.1.1 a-special-form
special operator


7.1.1.1 Syntax

a-special-form-form: result-class
( a-special-form form-1 ... form-nopt )
Arguments

form-1 :

description of structure and rôle of form-1.
.
..

form-nopt :

description of structure and rôle of optional argument form-nopt.

Result

A description of the result and, possibly, its result-class.

Remarks

Any additional information defining the behaviour of a-special-form or the syntax category a-special-form-form.

Examples

Some examples of use of the special form and the behaviour that should result.

See also

Cross references to related entries.


7.1.2 a-function
function


7.1.2.1 Signature

(a-function argument-1 ... argument-nopt)
result-class
Arguments

argument-1 :

information about the class or classes of argument-1.
.
..

argument-nopt :

information about the class or classes of the optional argument argument-n.

Result

A description of the result and, possibly, its result-class.

Remarks

Any additional information about the actions of a-function.

Examples

Some examples of calling the function with certain arguments and the result that should be returned.

See also

Cross references to related entries.


7.1.3 a-generic
generic function


Generic Arguments

argument-a <class-a> :

means that argument-a of a-generic must be an instance of <class-a> and that argument-a is one of the arguments on which a-generic specializes. Furthermore, each method defined on a-generic may specialize only on a subclass of <class-a> for argument-a.
..
.

argument-n :

means that (i) argument-n is an instance of <object>, i.e. it is unconstrained, (ii) a-generic does not specialize on argument-n, (iii) no method on a-generic can specialize on argument-n.

Result

A description of the result and, possibly, its class.

Remarks

Any additional information about the actions of a-generic. This can take two forms depending on the function. This will probably be in general terms, since the actual behaviour will be determined by the methods.

See also

Cross references to related entries.


7.1.4 a-generic <class-a>
method


(A method on a-generic with the following specialized arguments.)

Specialized Arguments

argument-a <class-a> :

means that argument-a of the method must be an instance of <class-a>. Of course, this argument must be one which was defined in a-generic as being open to specialization and <class-a> must be a subclass of the class.
.
..

argument-n :

means that (i) argument-n is an instance of <object>, i.e. it is unconstrained, because a-generic does not specialize on argument-n.

Result

A description of the result and, possibly, its class.

Remarks

Any additional information about the actions of this method attached to a-generic.

See also

Cross references to related entries.


7.1.5 <a-condition>
<condition>  condition


Initialization Options

keyword-a value-a :

means that an instance of <a-condition> has a slot called keyword-a which should be initialized to value-a, where value-a is often the name of a class, indicating that value-a should be an instance of that class and a description of the information that value-a is supposed to provide about the exceptional situation that has arisen.
..
.

keyword-n value-n :

As for keyword-a.

Remarks

Any additional information about the circumstances in which the condition will be signalled.


7.1.6 <a-class>
<class>  class


Initialization Options

keyword-a value-a :

means that <a-class> has an keyword whose name is keyword-a and the description will usually say of what class (or classes) value-a should be an instance. This keyword is required.
.
..

[keyword-n value-n] :

The enclosing square brackets denote that this keyword is optional. Otherwise the interpretation of the definition is as for keyword-a.

Remarks

A description of the rôle of <a-class>.


7.1.7 a-constant <a-class>
constant


Remarks

A description of the constant of type <a-class>.

7.2 Naming

Naming conventions are applied in the descriptions of primitive and defined classes as well as in the choice of other function names. Here is a list of the conventions and some examples of their use.
7.1 <name>” wrapping:
By convention, classes have names which begin with “<” and end with “>”.
7.2 binary” prefix:
The two argument version of a n-ary argument function. For example binary+ is the two argument (generic) function corresponding to the n-ary argument + function.
7.3 -class” suffix:
The name of a metaclass of a set of related classes. For example, <function-class>, which is the class of <simple-function>, <generic-function> and any of their subclasses. The exception is <class> itself which is the default metaclass. The prefix should describe the general domain of the classes in question, but not necessarily any particular class in the set.
7.4 generic-” prefix:
The generic version of the function named by the stem.
7.5 hyphenation:
Function and class names made up of more than one word are hyphenated, for example: compute-specialized-slot-class.
7.6 make-” prefix:
For most primitive or defined classes there is constructor function, which is usually named make-class-name.
7.7 !” suffix:
A destructive function is named by a “!” suffix, for example the destructive version of reverse is named reverse!.
7.8 ?” suffix:
A predicate function is named by a “?” suffix, for example cons?.