Comment

Comment by kstenerud

This is a dangerous way to think about it. State and time are different things, and if you think of them as the same, then your mental model glosses over some parts of reality that will become important as your software grows more complex.

State is inherently dangerous BECAUSE a program runs TEMPORALLY. As the number of state changes increases, the dangers of an unwanted state increase (particularly insidious are the state combinations you thought weren't even possible). This is why functional programmers favor immutability and idempotent functions.

Also: Just because the EXTERNAL observability of state hasn't changed is no reason to assume that no state changes have occurred. Hidden state changes are the most dangerous of all.

parent kstenerud 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton