7 ms·
Python 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 co
by sedachv 9y ago
Python 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?"
- sedachv 9y ago> What are other use cases of first-class identifiers, other than making some function arguments or macros look prettier? You are completely missing the point. Not having identifiers be first-class objects with unique identity is how Python ended up being unable to reload code properly.