3 ms·
This style of doing things is very common in languages with a (good) REPL, think clojure or ipython. You keep sending snippets and iterating on them until they
by wcrossbow 3y ago
This style of doing things is very common in languages with a (good) REPL, think clojure or ipython. You keep sending snippets and iterating on them until they work as intended. For that, you don't need the full context of your program.
Not a LISPer but apparently in that land you could actually have the program running and a REPL attached to it, in which case, you actually do have all the program at your disposal.
- vladvasiliu 3y agoThe only nice REPL I have experience with is ipython. And even a few years ago, just turning on autoreload allowed me to do that without selecting anything and copying / pasting, just edit the function in the editor and run it again. IIRC the docs said there were some edge cases, but I never ran into those.
- crabbone 3y agoWhy do people keep repeating it... Python doesn't have a REPL. It has an interactive shell. Read-eval-print-loop relies on being able to feed what you print back to the read function. Interactive shell doesn't need the ability to print code: it prints whatever information a function wants to print (often times nothing). In Python sometimes you can feed back the results of a function into some other function (when you are in the interactive shell), but usually they are nothing like Python code...