4 ms·
State is data that you use in control flow decisions. (This is a 5-second reaction, not a deeply considered opinion, don't take it too seriously)
by azornathogron 3y ago
State is data that you use in control flow decisions.
(This is a 5-second reaction, not a deeply considered opinion, don't take it too seriously)
- pull_my_finger 3y ago> (This is a 5-second reaction, not a deeply considered opinion, don't take it too seriously) If you have to put a disclaimer that basically invalidates your statement, why make the statement at all?
- azornathogron 3y agoIt doesn't invalidate it, it offers context.
- gavinhoward 3y agoThis is the correct formulation. I also have a blog post coming out tomorrow with a bit of justification for this.
- RangerScience 3y agoI like it! I don't know if I agree, but, the category of "data used in control flow" is a good one. I think... maybe this definition needs a narrower category of control flow? Like, technically, if you're converting 24-hour time to 12-hour AM/PM time, you have control flow (if > 12 hours). IMO that seems like it shouldn't be state. But, "we've delivered this message, so don't try to deliver it again" definitely involves control flow and definitely feels like state. Something like "this list is sorted" is in-between; it's re-computable (easily, depending on list size), if it's not done you want to do it, but after that it doesn't affect control flow. Maybe the difference is "control flow that modifies other data"?