I've been experimenting with an 'evaluate up to cursor' mode for my PL project.
I love evaluating self-contained snippets in Lisp, this generalises the idea.
The interpreter remembers the arguments when you run tests, then can re-use them when you say 'eval up to here'.
What do you think?
miniblog.
Related Posts
Thinking more about the "auto eval definitions" approach, I think it breaks down when debugging. If I want to step through the existing definition, it'd be really awkward to re-evaluate the definition at my cursor.
The lisp model of programming is generally: write a function, evaluate it, interactively call it with some arguments, iterate. Jupyter notebooks are similar.
Why not automatically evaluate definitions (not expressions) whilst working? It seems like it could be a satisfying way to work with code.
I like the concept of a REPL: an interactive environment where you can redefine code and evaluate snippets to see the result.
I try to avoid the term "REPL" though. Most languages don't use "read" for parsing (the R) and it's confusing. Are there good alternatives?