Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Most recent standard of Common Lisp

Could anyone tell me what the most recent document standardizing Common Lisp is, please (one that shoud be followed by the various implementations)? I ask because many books about CL that I can find online come from the '90s, so I'm wondering whether they are up-to-date. I also come from a Scheme background where standardization is done in the RnRS series. For CL I am only aware of the ANSI X3.226:1994 standard (X3J13); is this it?

EDIT
Thank you for the answer, before closing the question let me slightly extend it: is the situation in CL the same as the one in Scheme, i.e. the various implementations implementing mutually incompatible extensions of the standard, to the result that there is no single "CL language", or is this community more uniform?

like image 787
Alex M. Avatar asked Nov 21 '15 20:11

Alex M.


2 Answers

Common Lisp

Common Lisp has had four language phases:

  1. 1984: CLtL, Common Lisp defined by the book Common Lisp, the Language
  2. 1990 CLtL2, Common Lisp described by the book Common Lisp, the Language, 2nd Edition. It described an interim state before the ANSI CL standard and is not fully compatible. The book is available in HTML format, see Common Lisp, the Language, 2nd Edition
  3. 1994, ANSI Common Lisp standard, see the CL HyperSpec. A useful free PDF has been made from the last draft, see Common Lisp Standard Draft.
  4. since then: stable core, various extensions, attempts on community standards (CDR)

Most current implementations provide the full ANSI CL standard with various extensions. Implementations which don't provide the full standard: mocl (by design) and GCL. For many extensions there are portable abstraction layers or portable library (threading, FFI, CLOS streams, ...).

In Common Lisp once can find out which language dialect an implementation provides, but only ANSI CL really matters today:

CL-USER 11 > (let ((dialects '()))
               (dolist (d '(:ansi-cl :cltl2 :cltl1))
                 (when (member d *features*) (push d dialects)))
               dialects)
(:ANSI-CL)

Scheme

Thus the Common Lisp situation is a bit different from Scheme: almost all Common Lisp implementations are providing a large common (!) language. For Scheme there are at least R5RS, R6RS and R7RS variants in use. But Scheme also has a lot of extensions and with a good community language extension management (see SRFI). There is some work on a R7RS large standard variant, which would standardize a large language: https://groups.google.com/forum/#!forum/scheme-reports-wg2

like image 81
Rainer Joswig Avatar answered Sep 30 '22 15:09

Rainer Joswig


Yes. It has not changed.

You can find it in hypertext form under the name "Common Lisp Hyperspec" (CLHS) online.

EDIT: Yes, there are different extensions that the implementations do independently of each other. However, for the most important ones, there are portability wrapper libraries that use read time conditionals to load the right code in the different environments. Examples: bordeaux-threads (threads), osicat (system calls).

like image 22
Svante Avatar answered Sep 30 '22 14:09

Svante