If you write your program this way, how does it interact with the environment (e.g user input, output, network…)? Something is missing.
And if it doesn’t interact with the environment, then your program is just one big pure function, in which case you get all of the benefits in OP’s proposal anyway, without having to worry about transforming old state to new state, you just gotta transform input to output.
If you write your program this way, how does it interact with the environment (e.g user input, output, network…)? Something is missing.
And if it doesn’t interact with the environment, then your program is just one big pure function, in which case you get all of the benefits in OP’s proposal anyway, without having to worry about transforming old state to new state, you just gotta transform input to output.