Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Lisp (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Language innovations== [[Paul Graham (programmer)|Paul Graham]] identifies nine important aspects of Lisp that distinguished it from existing languages like [[Fortran]]:<ref>{{Cite web |title=What Made Lisp Different |date=May 2002 |url=http://paulgraham.com/diff.html |author=Paul Graham}}</ref> * [[Conditional (computer programming)|Conditionals]] not limited to [[goto]] * [[First-class function]]s * [[Recursion]] * Treating variables uniformly as [[Pointer (computer programming)|pointers]], leaving types to values * [[Garbage collection (computer science)|Garbage collection]] * Programs made entirely of [[Expression (computer science)|expressions]] with no [[Statement (computer science)|statements]] * The [[Symbol (programming)|symbol]] data type, distinct from the [[String (computer science)|string]] data type * Notation for code made of trees of symbols (using many [[parentheses]]) * Full language available at [[load time]], [[compile time]], and [[Runtime (program lifecycle phase)|run time]] Lisp was the first language where the structure of program code is represented faithfully and directly in a standard data structure—a quality much later dubbed "[[homoiconicity]]". Thus, Lisp functions can be manipulated, altered or even created within a Lisp program without lower-level manipulations. This is generally considered one of the main advantages of the language with regard to its expressive power, and makes the language suitable for syntactic macros and [[meta-circular evaluator|meta-circular evaluation]]. A conditional using an ''[[if–then–else]]'' syntax was invented by McCarthy for a chess program written in [[Fortran]]. He proposed its inclusion in [[ALGOL]], but it was not made part of the [[Algol 58]] specification. For Lisp, McCarthy used the more general ''cond''-structure.<ref name="bUXap">{{cite web|url=http://www-formal.stanford.edu/jmc/history/lisp/node2.html|title=LISP prehistory - Summer 1956 through Summer 1958.|quote=I invented conditional expressions in connection with a set of chess legal move routines I wrote in FORTRAN for the IBM 704 at M.I.T. during 1957–58 ... A paper defining conditional expressions and proposing their use in Algol was sent to the Communications of the ACM but was arbitrarily demoted to a letter to the editor, because it was very short.}}</ref> [[Algol 60]] took up ''if–then–else'' and popularized it. Lisp deeply influenced [[Alan Kay]], the leader of the research team that developed [[Smalltalk]] at [[Xerox PARC]]; and in turn Lisp was influenced by Smalltalk, with later dialects adopting object-oriented programming features (inheritance classes, encapsulating instances, message passing, etc.) in the 1970s. The [[Flavors (programming language)|Flavors]] object system introduced the concept of [[multiple inheritance]] and the [[mixin]]. The [[Common Lisp Object System]] provides multiple inheritance, multimethods with [[multiple dispatch]], and first-class [[generic functions]], yielding a flexible and powerful form of [[dynamic dispatch]]. It has served as the template for many subsequent Lisp (including [[Scheme (programming language)|Scheme]]) object systems, which are often implemented via a [[Metaobject#Metaobject Protocol|metaobject protocol]], a [[Reflective programming|reflective]] [[Meta-circular evaluator|meta-circular design]] in which the object system is defined in terms of itself: Lisp was only the second language after Smalltalk (and is still one of the very few languages) to possess such a metaobject system. Many years later, Alan Kay suggested that as a result of the confluence of these features, only Smalltalk and Lisp could be regarded as properly conceived object-oriented programming systems.<ref name="4I08d">{{cite web|date=2003-07-23|url=http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en|title=Meaning of 'Object-Oriented Programming' According to Dr. Alan Kay|quote=I didn't understand the monster LISP idea of tangible metalanguage then, but got kind of close with ideas about extensible languages ... The second phase of this was to finally understand LISP and then using this understanding to make much nicer and smaller and more powerful and more late bound understructures ... OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them.}}</ref> Lisp introduced the concept of [[Garbage collection (computer science)|automatic garbage collection]], in which the system walks the [[Heap (memory management)|heap]] looking for unused memory. Progress in modern sophisticated garbage collection algorithms such as generational garbage collection was stimulated by its use in Lisp.<ref name="dpvwj">{{citation |last1=Lieberman |first1=Henry |last2=Hewitt |first2=Carl |title=A Real-Time Garbage Collector Based on the Lifetimes of Objects |url=http://web.media.mit.edu/~lieber/Lieberary/GC/Realtime/Realtime.html |journal=Communications of the ACM |volume=26 |issue=6 |date=June 1983 |pages=419–429 |doi=10.1145/358141.358147|hdl=1721.1/6335 |citeseerx=10.1.1.4.8633 |s2cid=14161480}}</ref> [[Edsger W. Dijkstra]] in his 1972 [[Turing Award]] lecture said, {{Blockquote|With a few very basic principles at its foundation, it [LISP] has shown a remarkable stability. Besides that, LISP has been the carrier for a considerable number of in a sense our most sophisticated computer applications. LISP has jokingly been described as "the most intelligent way to misuse a computer". I think that description a great compliment because it transmits the full flavour of liberation: it has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts.<ref name="v8uNE">{{citation|url=http://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html|author=Edsger W. Dijkstra|year=1972|title=The Humble Programmer (EWD 340)}} (ACM Turing Award lecture).</ref>}} Largely because of its resource requirements with respect to early computing hardware (including early microprocessors), Lisp did not become as popular outside of the [[AI]] community as [[Fortran]] and the [[ALGOL]]-descended [[C (programming language)|C]] language. Because of its suitability to complex and dynamic applications, Lisp enjoyed some resurgence of popular interest in the 2010s.<ref name="chI3V">{{cite web|url=https://www.linkedin.com/pulse/look-clojure-lisp-resurgence-todd-towles|title=A Look at Clojure and the Lisp Resurgence}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)