6 ms·
Do you like Python? Python is basically simplified Lisp. Common Lisp is Python plus first-class lexical closures (rather than second-class) plus true multithrea
by dreamcompiler 9y ago
Do you like Python? Python is basically simplified Lisp. Common Lisp is Python plus first-class lexical closures (rather than second-class) plus true multithreading plus a real compiler so it runs much faster.
Plus parentheses rather than indentation to delimit expressions; parentheses are much more versatile once you get used to them.
- reikonomusha 9y agoPython and Common Lisp are pretty wildly different in almost every social, technological, and philosophical sense.
- flavio81 9y agoYep! This video was awesome, and entertaining as well, Mr. Tarballs-are-good/Symbol1cs/Stylewarning ("stylewarning" as a twitter ID made me ROFL). In particular, the comparison between calligraphy and Lisp programming was a very good one. I've sent you a LinkedIn request, by the way. I'm the bald one in business suit.
- flavio81 9y ago>Do you like Python? Python is basically simplified Lisp. Common Lisp is Python I am very experienced and proficient with Python. Common Lisp goes way, way beyond what Python brings to the table. Take CLOS for example and compare it with Python's OOP facilities. CLOS is light years ahead. Another differences (among many): Python is a high-level language. In CL, you can be high level and low level at the same time. For example, in CL you can disassemble your code to machine language and apply optimization directives and declarations to produce the shortest code, which can approach C speeds if done right. That said, I still like Python a lot. >Python is basically simplified Lisp. ... and I thank you for this phrase, perhaps I can use it whenever I need to justify my usage of Common Lisp at my workplace.
- pjmlp 9y agoThe sad part is that Ruby and Python could have taken some lessons from Lisp, how to have a dynamic language that has a good toolchain to generate native code. Thankfully we have now Julia, as yet another Algol-Lisp attempt.
- erikj 9y agoPython lacks the most important feature of Common Lisp - defmacro.
- sedachv 9y agoPython is in no way a Lisp. Python is not homoiconic, does not have first-class identifiers (symbols), and does not have full support for dynamically loading code (https://news.ycombinator.com/item?id=14666300 https://news.ycombinator.com/item?id=14666300). All that makes Python much closer to BASIC than to other dynamic programming languages. I think of Python as a BASIC with an object system and a couple of incorrectly borrowed ideas from Scheme (lexical scoping and first-class functions). There is not much "simplified" there compared to Lisp 1.5, just less features with more complexity.
- rhaps0dy 9y agoWell, the comparison by Peter Norvig makes Python and Lisp look pretty similar (https://norvig.com/python-lisp.html https://norvig.com/python-lisp.html, also linked below in this thread). In some cases, you can get around no-first-class-identifiers in Python by using strings and getattr(object, symbol) or locals()[symbol]. (What are other use cases of first-class identifiers, other than making some function arguments or macros look prettier?)
- PuercoPop 9y agoAnd when Norvig made that claim in from of McCarthy, McCarthy disagreed. > Peter bravely repeated his claim that Python is a Lisp. > Yes, John?" Peter said. > I won't pretend to remember Lisp inventor John McCarthy's exact words which is odd because there were only about ten but he simply asked if Python could gracefully manipulate Python code as data. > "No, John, it can't," said Peter and nothing more, graciously assenting to the professor's critique, and McCarthy said no more though Peter waited a moment to see if he would and in the silence a thousand words were said. http://smuglispweeny.blogspot.pe/2008/02/ooh-ooh-my-turn-why-lisp.html http://smuglispweeny.blogspot.pe/2008/02/ooh-ooh-my-turn-why...
- dreamcompiler 9y agoI was at that meeting. The mood in the room toward Norvig was "Who are you and what have you done with Peter Norvig?"
- dreamcompiler 9y agoIt's funny that I've been downvoted for this comment, given that I've made a living writing Common Lisp for most of my career (including working with the presenter in this video at one of the companies he describes). Of course Python is nowhere close to CL. (If anything, Javascript is closer because it has first-class closures.) But I've found that if you tell people the whole truth up front -- rather than letting them discover it for themselves -- it comes off as condescending.
- Jach 9y agoPeople probably just thought you missed the biggest differences. None of your three would come to mind if someone asked me the main differences of CL and Python (especially real multi-threading considering it's not in the standard even if bordeaux-threads works everywhere) and I'm not close to being a CL expert. I might get to 'performance' eventually if I had to list a bunch. If you 'let people discover the truth' then you get a person who reads a couple chapters of SICP when they're 16, thinks they know Lisp, dismisses it as a cool idea language but not practical (compared to the more familiar and productive Python, Java, PHP..), and maybe just maybe ~10 years later they see an example like https://news.ycombinator.com/item?id=12222404 https://news.ycombinator.com/item?id=12222404 and say "I never knew Lisp, what have I missed out on?" But they could have been told what they were missing out on in the beginning! "Condescending Smug Lisp Weenies" may be Lisp Enemy #1, but I think Enemy #2, not far behind, is probably "People who think they know Lisp, but actually don't, write it off due to incorrect assumptions". That said, I do think there's a certain something common to Lisp and Python that draws people to use both. e.g. Norvig. I think his page at https://norvig.com/python-lisp.html https://norvig.com/python-lisp.html is a pretty balanced comparison.
- progman 9y agoThe only foreign languages which come close to Lisp with a Python like syntax are Stanza [1] and Nim [2]. Stanza feels like a Lisp with infix syntax. The closeness to Lisp explains why Stanza makes a semantic difference between "f(x)" (which is a function application) and "f (x)" which is a sequence of two elements (f and x). Unlike Nim which is strongly typed, Stanza allows to mix typed and untyped data freely. [1] lbstanza.org [2] nim-lang.org