Naming conventions: "State" versus "Status"

Sophistifunk picture Sophistifunk · Jul 22, 2009 · Viewed 44.2k times · Source

Quick question: I'd like to hear your thoughts on when to use "State" versus "Status" when naming both fields such as "Foo.currentState" vs "Foo.status" and types, like "enum FooState" vs "enum FooStatus". Is there a convention discussed out there? Should we only use one? If so which one, and if not, how should we choose?

Answer

spemble picture spemble · Jun 27, 2012

IMO:

status == how are you? [good/bad]

state == what are you doing? [resting/working]