{"id":55281,"date":"2020-01-17T00:00:00","date_gmt":"2020-01-16T21:00:00","guid":{"rendered":"https:\/\/prohoster.info\/blog\/blog_prohoster\/chto-sdelalo-lisp-osobennym"},"modified":"2020-02-18T14:03:23","modified_gmt":"2020-02-18T11:03:23","slug":"chto-sdelalo-lisp-osobennym","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/chto-sdelalo-lisp-osobennym","title":{"rendered":"What Made Lisp Special","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<blockquote><p>&lt;&lt;<i>The greatest programming language ever created<\/i>&lt;&lt;<br \/>\n \u2014 Alan Kay, \"on Lisp\"<\/p><\/blockquote>\n<p>\n<img decoding=\"async\" alt=\"What Made Lisp Special\" src=\"\/wp-content\/uploads\/2020\/01\/64f1d8e27f54f8acd763bc17d0bfb57b.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nWhen McCarthy developed Lisp in the late 1950s, it was radically different from existing languages, the most notable of which was <noindex><a rel=\"nofollow\" href=\"http:\/\/www.paulgraham.com\/history.html\">Fortran<\/a><\/noindex>.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nLisp embodied nine new ideas:<\/p>\n<p>1. <b>Conditional statements (Conditionals)<\/b>. Conditional statements are the if-then-else constructs. We take them for granted now. They were <noindex><a rel=\"nofollow\" href=\"http:\/\/www-formal.stanford.edu\/jmc\/history\/lisp\/node2.html\">invented<\/a><\/noindex> by McCarthy during the development of Lisp. (At that time, Fortran only had goto statements, closely tied to the branching instruction on the underlying hardware.) McCarthy, being on the Algol committee, introduced conditional statements to Algol, from which they spread to other languages.<\/p>\n<p>2. <b>Functional types (A function type)<\/b>In Lisp, functions are first-class objects\u2014they are a data type just like numbers, strings, etc., and have a literal representation, can be stored in variables, can be passed as arguments, etc. <\/p>\n<p>3. <b>Recursion (Recursion)<\/b>Recursion, of course, existed as a mathematical concept before Lisp, but Lisp was the first programming language to support it. (This is possibly implied by the creation of functions as first-class objects.)<\/p>\n<p>4. <b>A new concept of variables (A new concept of variables)<\/b>In Lisp, all variables are effectively pointers. Values are what types have, not variables, and assigning or binding variables means copying pointers rather than what they point to.<\/p>\n<p>5. <b>Garbage collection (Garbage-collection)<\/b>.<\/p>\n<p>6. <b>Programs composed of expressions (Programs composed of expressions)<\/b>Programs in Lisp are trees of expressions, each of which returns a value. (Some Lisp expressions can return multiple values.) This contrasts with Fortran and many other successful languages that distinguish between 'expressions' and 'statements'.<\/p>\n<p>It was natural to have such a distinction in Fortran because the language was linearly oriented (no surprise for a language where the input format was punch cards). You couldn\u2019t have nested statements. And while you needed mathematical expressions to work, there was no point in making anything else return a value because there might not be anything expecting a return.<\/p>\n<p>The constraints were lifted with the advent of block-structured languages, but by that time it was already too late. The distinction between expressions and statements had already settled. It passed from Fortran to Algol and on to their descendants.<\/p>\n<p>When a language is made entirely of expressions, you can compose expressions as you wish. You can write either (using the syntax\u00a0<noindex><a rel=\"nofollow\" href=\"http:\/\/www.paulgraham.com\/arc.html\">Arc<\/a><\/noindex>)<\/p>\n<pre><code class=\"lisp\">(if foo (= x 1) (= x 2))<\/code><\/pre>\n<p>\nor<\/p>\n<pre><code class=\"lisp\">(= x (if foo 1 2))<\/code><\/pre>\n<p>\n7. <b>Symbol type<\/b>. Symbols differ from strings; in this case, you can check for equality by comparing pointers.<\/p>\n<p>8. <b>Notation for code<\/b> using trees of symbols.<\/p>\n<p>9. <b>The whole language always available<\/b>. There is no explicit difference between read time, compile time, and run time. You can compile or run code while reading, or read or run code while compiling, or read or compile code during execution.<\/p>\n<p>Running code during reading allows users to reprogram the syntax of Lisp; running code during compilation is the basis for macros; compiling at runtime is the foundation for using Lisps as extension languages in programs like Emacs; and finally, reading at runtime allows programs to interact using s-expressions, an idea recently reinvented in XML.<\/p>\n<h4>Conclusion<\/h4>\n<p>\nWhen Lisp was first invented, all these ideas were far from the standard programming practices dictated by the hardware available in the late 1950s.<\/p>\n<p>Over time, the default language, embodied in the success of popular languages, has gradually evolved towards Lisp. Points 1-5 are now widely adopted. Point 6 is starting to appear in the mainstream. Python has a version of point 7, although there is no suitable syntax for it. Point 8, which (along with point 9) enables macros in Lisp, still only exists in Lisp, possibly because (a) it requires these parentheses or something equally cumbersome, and (b) if you introduce this last increase in power, you can no longer claim to have invented a new language, but have merely developed a new dialect of Lisp; -)<\/p>\n<p>While this is helpful for modern programmers, it is odd to describe Lisp in terms of its differences from random tricks adopted in other languages. This may not be what McCarthy had in mind. Lisp was not designed to fix Fortran's errors; it emerged rather as a byproduct of an attempt <noindex><a rel=\"nofollow\" href=\"http:\/\/www.paulgraham.com\/rootsoflisp.html\">to axiomatize computation<\/a><\/noindex>.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/476994\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>&#171;\u0412\u0435\u043b\u0438\u0447\u0430\u0439\u0448\u0438\u0439 \u0438\u0437 \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f&#171; \u2014 Alan Kay, \u00abon Lisp\u00bb \u041a\u043e\u0433\u0434\u0430 \u041c\u0430\u043a\u043a\u0430\u0440\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b Lisp \u0432 \u043a\u043e\u043d\u0446\u0435 1950-\u0445, \u043e\u043d \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0441\u044f \u043e\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432, \u0441\u0430\u043c\u044b\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u044b\u043b Fortran. Lisp \u0432\u043e\u043f\u043b\u043e\u0442\u0438\u043b \u0434\u0435\u0432\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0445 \u0438\u0434\u0435\u0439: 1. \u0423\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u044f (Conditionals).\u00a0\u0423\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e if-then-else \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c \u0438\u0445 \u043a\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u043e\u0435. \u041e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u044b \u041c\u0430\u043a\u043a\u0430\u0440\u0442\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":55282,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-55281","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"&quot;\u0412\u0435\u043b\u0438\u0447\u0430\u0439\u0448\u0438\u0439 \u0438\u0437 \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f&quot; \u2014 Alan Kay, \u00abon Lisp\u00bb\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/chto-sdelalo-lisp-osobennym\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0427\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u043e Lisp \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u044b\u043c | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"&quot;\u0412\u0435\u043b\u0438\u0447\u0430\u0439\u0448\u0438\u0439 \u0438\u0437 \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f&quot; \u2014 Alan Kay, \u00abon Lisp\u00bb\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/chto-sdelalo-lisp-osobennym\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-01-16T21:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-18T11:03:23+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47What Made Lisp Special | ProHoster","description":"\"The greatest programming language ever created\" \u2014 Alan Kay, 'on Lisp'","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/chto-sdelalo-lisp-osobennym","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0427\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u043e Lisp \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u044b\u043c | ProHoster","og:description":"&quot;\u0412\u0435\u043b\u0438\u0447\u0430\u0439\u0448\u0438\u0439 \u0438\u0437 \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f&quot; \u2014 Alan Kay, \u00abon Lisp\u00bb","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/chto-sdelalo-lisp-osobennym","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-01-16T21:00:00+00:00","article:modified_time":"2020-02-18T11:03:23+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"55281","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 19:46:29","updated":"2022-10-01 02:03:35","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/55281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=55281"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/55281\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/55282"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=55281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=55281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=55281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}