4 ms·
I like Python, but the using the REPL w/ Python's indentation is not fun for me.
by devoutsalsa 6y ago
I like Python, but the using the REPL w/ Python's indentation is not fun for me.
- kristjansson 6y agoI'd venture a guess that anyone advocating REPL-based development in Python is pitching IPython/Jupyter. IPython's REPL supports multi-line editing, trims common leading whitespace from pasted input, among a whole host of other features. The standard REPL is definitely painful for all but the most basic tasks.
- alex_smart 6y agoThat's why you write code in your editor, and just ask your editor to send code to the REPL.
- devoutsalsa 6y agoWhy not just run the file? To be more specific, I get a lot of value out of Ruby, Elixir, and JavaScript REPLs because I can type right into them to try stuff out in one long, ridiculous command. If I have to type in a file, I'm just gonna run the file & print the result.
- alex_smart 6y ago>Why not just run the file? It's faster. That's the point of using a REPL. >To be more specific, I get a lot of value out of Ruby, Elixir, and JavaScript REPLs because I can type right into them to try stuff out in one long, ridiculous command. You can type long, ridiculous commands in a file too. Just clean it up as you go along. I like to use my editor to send inputs to the REPL instead of typing directly into the REPL because different REPLs provide different editing experiences. Using my editor means all the editing features I like to use are always available.