Remember that amazing presentation from Bret Victor “Inventing on Principle”?
It is called live coding. What You Code Is What You See - WYCIWYS.
I thought his demos were hardcoded. But it turns out, there is a real programming language allowing such crazy things in runtime. Check out a short video:
The language is called circa. Currently it is alpha. On my amateurish opinion in the game development, it is very convenient for experiements with gameplay, at least for 2D games.
Here is an interesting article from the author about preserving the runtime state on live code changes.