OK, so we're in agreement that we'll use a mutable String to accumulate state. The String will be explicitly passed around. We're motivated by a desire to increase readability (by high-lighting the state accumulator) and a desire to reduce implicit side effects.
This will make the code more stable, more readable, and more testable.
Actually I am agnostic about the particular type (e.g. mut String) we use... whatever is easiest (IMHO).
OK, so we're in agreement that we'll use a mutable String to accumulate state. The String will be explicitly passed around. We're motivated by a desire to increase readability (by high-lighting the state accumulator) and a desire to reduce implicit side effects.
This will make the code more stable, more readable, and more testable.
Actually I am agnostic about the particular type (e.g.
mut String
) we use... whatever is easiest (IMHO).