3 ms·
Named and Unnamed state. "It seems that we need to have and not have named state at the same time. How do we solve this dilemma? One solution is to concentrate
by alrex021 17y ago
Named and Unnamed state.
"It seems that we need to have and not have named state at the same time. How do we solve this dilemma? One solution is to concentrate the use of named state in one part of the program and to avoid named state in the rest. The bulk of the program is a pure function without named state. The rest of the program is a state transformer: it calls the pure function to do the actual work. This concentrates the named state in a small part of the program."
This very closely resembles the philosophy behind Clojure.