1.8 KiB
Lisp
Lisp (originally LISP for List Processing) is a family of programming languages that share common features such as the S-Expression syntax, powerful metaprogramming capabilities with macros adding extensibility, the use of lists as the principal data structure, first-class functions (lambdas), garbage collection and recursion.
Lisp was created in 1958 by John McCarthy, making Lisp on of the oldest languages used today, second to Fortran. Originally Lisp didn't use the now ubiquitous S-Expression syntax but M-Expressions (as used in the Lisp 1.5 manual), however S-Expressions turned out to be more popular and Lisps began using it.
Unlike other languages at the time and also modern languages, Lisp is homoiconic, that is, Lisp source code is data that can be manipulated by the program itself. This gives Lisp powerful metaprogramming capabilities through the use of macros which modify the program data at compile time. Therefore, Lisp source code directly represents the program as a tree without extra superfluous syntax (as in "mainstream" programming languages).
A PDF of the original Lisp 1.5 manual can be found here: https://www.lispmachine.net/books/LISP_1.5_Programmers_Manual.pdf. Head to page 13 for enlightenment.
Lisp languages in use
- Scheme: created by the hackers Guy Steele and Gerald Sussman in 1970 at the MIT. Has multiple implementations, Chez Scheme, Chicken Scheme, MIT/GNU Scheme, etc.
- Common Lisp: Big for Lisp standards (still better and smaller than "modern" languages), is also the most used Lisp today. The main implementation is SBCL, a public domain JIT compiler.
- GNU Guille
- Clojure: based in the JVM (Java Virtual Machine), does not have
cons
,car
orcdr
. - ...
Examples
TODO