[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A Modest (Subset) Proposal

Chapter 1. Introduction

This is a very small subset of CL, intended for research and
teaching purposes.  Except where specified, or where the subset
would be inconsistently extended, the text is assumed to be
exactly that in the CLM.

Chapter 2. Data Types

The subset has two data types: atom and cons, which partition
the data space.  No other data types are necessary.

Chapter 3. Scope and Extent

Variables are always lexically scoped.  No specials are allowed.

Chapter 4. Type Specifiers

Since the set of types is fixed, type specifiers are not necessary.

Chapter 5. Program Structure

The special forms are QUOTE and IF.
While lambda expressions are allowed, they may not use any of the

Chapter 6. Predicates

ATOM object						Function

EQ x y							Function

All atoms of the same print name are eq.

Chapter 7. Control Structure

QUOTE object						Special form

APPLY function arglist					Function

The function may be a lambda-expression only.

IF test then [else]					Special form

Chapter 8. Macros

This subset includes no macros, since they are hard to write properly.

Chapter 9. Declarations

Since CL declarations are optional, they are not necessary.

Chapter 10. Symbols

Symbols have print names only.

Chapter 11. Packages

Properly written Lisp programs are always small; therefore, a
package system would encourage sloppy programming and thus is
not included.

Chapter 12. Numbers

Since numbers can be modelled using lists, they do not need to be
defined as separate datatypes.

[Implementors Note: any sufficiently good compiler should be able
to transform list code into numeric machine code.]

Chapter 13. Characters

Since characters can be modelled using numbers (cf. Chapter 12),
they need not be defined as separate datatypes.

Chapter 14. Sequences

Nobody likes the sequence functions, so they have been removed.

Chapter 15. Lists

CAR list						Function

CDR list						Function

CONS x y						Function

Chapter 16. Hash Tables

Nobody likes hash tables.

Chapter 17. Arrays

Nobody likes the arrays either.

Chapter 18. Strings

Since strings can be modelled as lists of characters (cf. Chap. 13),
they need not be included in the language.

Chapter 19. Defstructs

Defstruct can be easily defined using the subset,
therefore its definition is left to the chromatic pages.

Chapter 20. The Evaluator

Everything in this chapter of the CLM is either hackery or irrelevant.

Chapter 21. Streams

Streams are only useful for I/O, therefore they are not included.

Chapter 22. Input/Output

[Implementors Note: if this is not provided, users will never
be able to complain about incorrect results.]

Chapter 23. File System Interface

Nothing in this chapter of the CLM has even a remote chance
of being portable, therefore it was left out.

Chapter 24.

Errors cause an immediate cessation of computation.

Chapter 25. Miscellaneous

If any of this stuff was *really* useful, it could have gotten
its own chapter.

						stan shebs