Common Lisp is a programming language created in 1984 by Scott Fahlman and Richard P. Gabriel and David A. Moon and Kent Pitman and Guy Steele and Dan Weinreb.
#166on PLDB | 40Years Old | 24kRepos |
Common Lisp (CL) is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 (R2004) (formerly X3.226-1994 (R1999)). The Common Lisp HyperSpec, a hyperlinked HTML version, has been derived from the ANSI Common Lisp standard. The Common Lisp language was developed as a standardized and improved successor of Maclisp. Read more on Wikipedia...
(format t "Hello, world!")
(defun hello-world ()
(format t "Hello World~%"))
(hello-world)
(DEFUN HELLO ()
(PRINT 'HELLO))
CL-USER > (available-shells)
(#P"/bin/bash" #P"/bin/csh" #P"/bin/ksh" #P"/bin/sh" #P"/bin/tcsh" #P"/bin/zsh")
Feature | Supported | Example | Token |
---|---|---|---|
Print() Debugging | ✓ | ||
Line Comments | ✓ | ; A comment | ; |
Multiple Inheritance | ✓ | ||
Directives | ✓ | ||
Comments | ✓ | ||
Multiple Dispatch | ✓ | (defmethod collide-with ((x asteroid) (y asteroid)) ;; deal with asteroid hitting asteroid ) (defmethod collide-with ((x asteroid) (y spaceship)) ;; deal with asteroid hitting spaceship ) (defmethod collide-with ((x spaceship) (y asteroid)) ;; deal with spaceship hitting asteroid ) (defmethod collide-with ((x spaceship) (y spaceship)) ;; deal with spaceship hitting spaceship ) | |
Single Dispatch | ✓ | ; https://eli.thegreenplace.net/2016/a-polyglots-guide-to-multiple-dispatch-part-3/ (defclass Person () ()) (defmethod frobnicate ((p Person) record spreadsheet) (format t "~a ~a ~a~&" (type-of p) (type-of record) (type-of spreadsheet))) (defclass Asteroid () ()) (defmethod frobnicate ((a Asteroid) velocity size) ; do stuff ) ; At runtime these 2 would be routed to respective methods: (frobnicate a-person his-record big-spreadsheet) (frobnicate an-asteroid very-fast pretty-small) | |
Semantic Indentation | X |