Save-Read-Eval-Print-Loop: The file is the REPL

In the language golden paths article, I highlighted the importance of interactive development but fell short describing how we might achieve it. After some time, I came up with the idea for a REPL but inside the working file instead of in some far off REPL session with a special mode.

To that end, I present SREPL. The S stands for Save because every time you save a file where SREPL is in use the file is evaluated and the results are printed out alongside the code as comments. I recorded a video to demonstrate what development looks like with SREPL:

I've been playing around with SREPL for a few days and it's been a big improvement over the standard node REPL, though I've always found the Node REPL especially clunky.

SREPL is open-source and available on NPM. It supports both JavaScript and TypeScript. While a concrete implementation is great, my overall goal here is to encourage more thinking about how to bring interactive development back to the forefront of language design. I hope SREPL is an example of how to do so and, of course, hopefully is of use to people.

Subscribe for new articles via Atom feed