logo

Mutability Considered Harmful

Posted by psteitz |3 hours ago |1 comments

joshsegall an hour ago

I think systems end up mutable not because anyone chose it but because their tools make mutation the path of least resistance. Kafka succeeded not because "immutable logs are better" was a new idea but because it made the immutable approach easier than the spaghetti alternative.

The mutability in these examples is almost entirely accidental complexity. The state changes are necessary for real world applications, but representing them as in-place mutation is a choice the tooling made for you.