← Back to context

Comment by bccdee

3 months ago

> harder to trace when you're debugging "why did this transaction get coded wrong" and the answer spans 6 different step outputs

That's definitely a pain, but I'm not sure it's easier when this is one variable being mutated in six different places. I think you're just running into the essential complexity of the problem.

Completely agree - it's essential complexity either way. The mutation approach just spreads it across time (when did this value change?), while the immutable approach spreads it across space (which step produced this value?).

The immutable version is probably easier to debug in practice since you can inspect each step's output independently. The "6 places" complaint was more about cognitive load during debugging than actual difficulty - you're jumping between files instead of scrolling through one. But that's a tooling/IDE problem, not an architecture one.