But, in clojure if you idiomatically model your app state as plain-ol-data, and naked functions that modify it, then you are in dynamic editing heaven. You can make any change at runtime as long as your live data is still compatible with the functions that use it.. which ends up being most of the time unless you change the semantics of an attribute.
Might not be the best example, but this article goes over live-coding a flappy bird clone
https://rigsomelight.com/2014/05/01/interactive-programming-...
Doing it in a statically typed language would be substantially harder, and to make it feel "good", probably require lots of tracking of library versions associated with particular data objects or strict isolation of how data passes across the library boundary. I don't think there's a great solution to be had.
When changing instance or class variables in Smalltalk, the system actually changing the object layout and goes and recompiles code using it. If you are interested in the details: Chapter 5 of [1] explains it a bit.
[1] Hirschfeld et al. Assisting System Evolution: A Smalltalk Retrospective. http://soft.vub.ac.be/Publications/2002/vub-prog-tr-02-25.pd...
I think the shared library types would need to be indirected either via compiler support, or some kind of `Hot<T>` wrapper that acts like a `Box<T>` when hot reloading is enabled, and like a `T` in "production" mode to be ergonomic.
Are those being hot-reloaded, or merely re-executed from scratch with no compile time?
When I think hotreload I think “persist state but update code”. Persisting state safely when you change data layout is almost impossible. Even if the language is dynamic you’ll have stale objects that are missing the new members or didn’t go through the new initialization routine.
I use hot reloading in C++ every day in Unreal Engine. However that only supports changing functions. If you change data layout you have to close the editor, rebuild, and relaunch.
I consider it a form of hot reloading. The Live+ website states "Live++ enables hot-reload for C/C++ applications, combining the power of rapid iteration with the speed of a compiled language."
Turn around time from changing a line of code is under 10 seconds. Closing and relaunching the editor is actually not too bad, but probably 30 seconds?