3 ms·
REPL's seem to get a lot of love these days. Do they have any advantage over a step through debugger (other than startup time)?
by collyw 12y ago
REPL's seem to get a lot of love these days. Do they have any advantage over a step through debugger (other than startup time)?
- keypusher 12y agoI find the primary advantage of a REPL being able to "explore" the language, or code. If I am trying to figure out how to slice a particular list of items and then split the items on a regex into key-value pairs for a map, sometimes I just prefer instant feedback and being able to mess around with live variables. That being said I often find that after about 5 minutes in (Python's) REPL I start wishing I had just written a script and run it in the interpreter instead, as going back to edit functions or build classes can be painful. Stuff like iPython offer solutions to this problem by integration with editors and more.
- mod3rn0 12y agoThe speed you get feedback is the key imo. When I use a language that has a repl I usually find myself using it more than the text editor / ide. And in my experience there's a nice side effect too: since you cannot write too much in the repl, you end up writing smaller functions that leads to more modular, reusable code.