Matlab has a nice sort-of-repl feature which I miss in every other language: you can separate the code in a file into several blocks and then execute the current block (the one with which contained the cursor) with ctrl+enter. With this feature you still have the full text editing capabilities but you also have a flexibility you get from a repl.
What makes a good REPL?
31–40 of 177 posts
Re: What makes a good REPL?
#32Matlab has a nice sort-of-repl feature which I miss in every other language: you can separate the code in a file into several blocks and then execute the current block (the one with which contained the cursor) with ctrl+enter. With this feature you still have the full text editing capabilities but you also have a flexibility you get from a repl.
Re: What makes a good REPL?
#33Matlab has a nice sort-of-repl feature which I miss in every other language: you can separate the code in a file into several blocks and then execute the current block (the one with which contained the cursor) with ctrl+enter. With this feature you still have the full text editing capabilities but you also have a flexibility you get from a repl.
[1]: http://jupyter-notebook.readthedocs.io/en/latest/examples/No...
Re: What makes a good REPL?
#34I would also add hot loading, aka the ability to change your code and get to the same point in the execution of the code.
Hot loading is typically a deployment feature that doesn't interact with the debugger at all (it doesn't require the program to be paused). Fix and continue (from smalltalk) never put the program back into a good state after code update.
Re: What makes a good REPL?
#35Earlier quoted context omitted.
They aren't really REPLs. A REPL isn't just a prompt that you can put code into.
REPL stands for read-eval-print loop. So yes, it is just a prompt that you can put code into that will print a result.
Re: What makes a good REPL?
#36Earlier quoted context omitted.
I like a good interpreted language as much as the next guy, but there are REPLs for compiled languages. Pretty sure Scala has one and maybe Haskell
Haskell has one - called GHCi. By these criteria: 1) You can define new functions (and values, and types, type classes, instances, etc). You can "redefine" these things only insofar as you can shadow them. 2) I'm not sure whether they mean the ability to persist your state to disk and restore it (which GHCi lacks), the ability to refer to previous results (in GHCi, the previous result is called `it`), or just the abi…
Re: What makes a good REPL?
#37I think REPLs work better in languages that provide 1st class immutability support, since it's easier to set up state once, then play with functions without having to re-set up state every time you tinker.
Re: What makes a good REPL?
#38I loved this article. I am a huge proponent of development ergonomics, and clojure(script) are really fantastic in this area. Most languages have a pretty similar standard set of tooling, but the pieces that a language does exceptionally well really stand out in cases like this. I'd really love to see what languages designed specifically with ergonomics/tooling in mind look like
Warren Teitelman (and later many people at Xerox PARC) did this with BBN Lisp/Interlisp, starting with real paper teletypes through to graphical workstations.
Re: What makes a good REPL?
#39Re: What makes a good REPL?
#40I would also add hot loading, aka the ability to change your code and get to the same point in the execution of the code.
Hot loading only implies the former (change code of a running app) and not the latter (automatically rerun application and return to paused point). Hot loading is typically a deployment feature that doesn't interact with the debugger at all (it doesn't require the program to be paused). Fix and continue (from smalltalk) never put the program back into a good state after code update.