re: Moving faster with REPL VIEW POST

FULL DISCUSSION
 

I always thought of Python having more of an interactive shell, rather than a REPL.

The REPL in Lisp also has the ability to inspect, debug, edit, on live code. The REPL is like having a built-in IDE, at the caliber of PyCharm.

Python distinguishes code from data, whereas Lisp does not. Python is not homoiconic, which Lisp's REPL leverages heavily.

Python print(repr(eval(raw_input("> ")))) compared to Lisp (loop (print (eval (read)))) has several other important differences. Python's eval works on only expressions. Python's eval combines parsing and evaluation, which leads to perennial Python problems of "safe eval" and "string representation of a dictionary" (leading to ast.literal_eval). Lisp's REPL is core to the engine, so a developer can extend Lisp at the most fundamental level (and has access via the REPL to the core engine; the developer can change the syntax of Lisp itself, such as by using W-expressions or L-expressions instead of only S-expression), whereas Python's interactive shell does not provide that kind of extensibility.

That being said, I'm a Python fanboy, and I don't much care to program in Lisp. Your mileage may vary.

 

Thanks for your thoughts!

Yeah, to be honest I actually haven't used Lisp, and it's definitely not a perfect analogy. I think that for simple use cases, the various flavors of shell, REPL, etc are somewhat interchangeable, but it is an important distinction as things get more complex.

code of conduct - report abuse