Interactive programming language minimizing reevaluations
The specific CS topic resolving the question is:
Incremental computing
A detailed article explaining a related DSL is:
IceDust: Incremental and Eventual Computation of Derived Values in Persistent Object Graphs