https://learn.microsoft.com/en-us/visualstudio/debugger/edit...
https://learn.microsoft.com/en-us/visualstudio/debugger/edit...
To be clear—I’m not making the argument that people should be writing programs in Lisp. Just that there are some things to learn from the way Lisp development works.
In the past, when I’ve used the various edit-and-continue tools, it felt it was just cutting some time out of the edit-compile-run cycle. The Lisp system feels more like a workbench, where you create fixtures to try things out while you are building the system.
There's plenty of mature options both commercial and free, and to me, many years ago,they have a similar feeling.
It doesn't simply replace a function binding; it actually replaces code and puts the instruction pointer of existing threads that were running that code into some similar location in the new code. (Which is pretty amazing, to be sure).
What's going on in Lisp code reloading is something a lot pedestrian; just new functions are replacing old ones. Thread which are in the middle of running the old functions continue with those ones. When the last thread is done executing a function, it can be garbage collected.
I don't work with life-critical software and yet auditors demand that every code-change to production is peer reviewed and linked to a jira item.
Something like Fix & Continue in Visual Studio is good for testing out smaller changes. By comparison, something like SLIME + Lisp is powerful enough to use for developing new features. The running system on your developer workstation is mostly synchronized with the source code on disk because the interface you use for making changes is the editor. This synchronization is not perfect, but that’s why you have your unit tests and CI/CD pipeline.
If you're implying that this isn't thread safe, you're wrong. Edit and continue works just like how you described Lisp code reloading. Works just fine in production if you're crazy enough to push a debug build.
I dunno why Lisp people keep advertising ancient and widely distributed tech as revolutionary. Eg have you looked at LLVM XRay? It's yet another "self modifying C code hack", except it's explicitly designed to work in production on release builds: https://llvm.org/docs/XRay.html