State

Published on 20 May 2014.

When I write code I want to make as few mistakes as possible. Over time I learn to avoid patterns that cause more problems than they solve. I learn how to choose better names to avoid confusion later on.

But state is a little different for me. It is so convenient to solve a problem by mutating a variable somewhere. Many programming languages are constructed to make this easy. That’s even how many programming languages encourages you to think about programming. In so many environments, it’s so convenient, and trying to avoid state is much harder.

Perhaps it is a good idea to carefully examine the costs and benefits of using state in our applications.


Site proudly generated by Hakyll.