Hacker News new | ask | show | jobs
by nhatbui 3526 days ago
> I skimmed documentation of Python after people told me it was fundamentally similar to Lisp. My conclusion is that that is not so. `read', `eval', and `print' are all missing in Python.

Maybe I'm getting lost in the semantics but doesn't Python have a REPL a la the interpreter?

1 comments

Yes. Also, there absolutely are all three functions. I don't know what the hell he's on about. https://docs.python.org/2/library/functions.html
The point he's stuck on is that the versions of 'read', 'eval', and 'print' in Python aren't the same as the ones in Lisp. In Python, you read a string, eval that string into a value, then print that value. The intermediate representation is a string -- just a bunch of characters. In Lisp, you read a data structure, eval that data structure into another data structure, then print out its form -- nested lists and atoms that you can inspect and manipulate, rather than characters that you need to parse to do anything useful with.