articles/lisp.md: new article
This commit is contained in:
parent
cce3bf40dd
commit
d7d2636045
1 changed files with 27 additions and 0 deletions
27
articles/lisp.md
Normal file
27
articles/lisp.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Lisp
|
||||
Lisp (originally LISP for **Lis**t **P**rocessing) is a family of [programming languages](programming_language.md) 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](jvm.md) (Java Virtual Machine), does not have `cons`, `car` or `cdr`.
|
||||
- ...
|
||||
|
||||
## Examples
|
||||
TODO
|
Loading…
Add table
Reference in a new issue