import time
value = "foo"
def go():
for i in range(10):
print("...", i, value)
time.sleep(3)
Then, in repl, import example
import threading
thread = threading.Thread(target=example.go)
thread.start()
It will slowly print out messages and you can do "example.value = 'bar'" in the REPL and it will change. As an example, I suppose that when you’re developing code in Python’s pseudo-REPL you often reimport a file containing class definitions. When you do that, what happens to all the old objects with the old class definition? Nothing, they still belong to the old class.
...
In Lisp, it’s different. There is a defined protocol for what happens when a class is redefined. Every single object belonging to the old class gets updated to the new class.
This. Lisp gives you ultimate power but of course, it means it unlocks more ways to shoot yourself in the foot in the process. Most organizations don't want "smart hacky" solution (i.e., they don't want you as the programmer to fix issues in creative ways that Lisp provides to you), instead, they want "standard processes" that can be taught to new hires (i.e., they want you as the programmer to write standard, idiomatic code that everyone understands). The latter comes at the cost of less flexibility (i.e., when your rock solid code crashes, it means you must update the source code instead of fixing it on the go like in Lisp restarts).
Common Lisp is not the be-all end-all in Lisp.
Redefining the classes of objects at run-time is not unilaterally a great idea.
It's not obvious how to implement it in such a way that applications which don't use it don't have to pay any extra cost for the support.
There being a defined protocol for what happens when a class being redefined does not add up to you automatically having an application that can upgrade itself while it is running, from any version to any version, bug free. You have to test and debug all the combinations, or else support only certain combinations, requiring multiple upgrades.
This is something that will add complexity to your upgrade plan.
I can see someone like NASA using such a tool for a very specific scenario, which can be replicated on Earth and tested, and then carried out remotely in some space probing vessel.