It's not that rare that my REPL sessions e.g. in Node are
> perform expensive computation
... result ...
> transform result
... transformed result ...
With this approach, the REPL slows down quadratically with session length, and any expensive command at the beginning is executed over and over again.
Also, better don't do any file I/O and then continue the session unless you're prepared for the consequences.
(Wrong as in "murdering puppies" wrong, not as in "here are the downsides of X" which I believe exist for every X.)
Good enough for your arbitrary standard? I would have thought the fact that all preceding side effects will be re-executed each time a new line is written is bad enough, but whatever.
Are we able to live ethically ?
(Which leads to "What is ethics ?", which eventually leads to " Ethics is nonsensical".)
You'll waste more electricity trying to solve it correctly than it will ever waste.
The real problem to solve would be: how to make GCC, Clang, etc. fast. Or how to make C++'s syntax easy and fast to work with.
Or how to convince people to switch to Rust? ;)
Why nothing at all, of course. A REPL need not be more than a way to test and explore syntax, functions, and logical structures.
> the user experience is REPL-ish and it can help some people learn the _basics_ of the language
PREPLISH exists for Perl ^_^