News for hackers. Stuff that matters.
Re:Flags Are a Code Smell (2014) by merlincorey on Sunday May 22, 2022 @03:47AM (#31465889)
> The article's most interesting point is that the vast majority of possible program (or object) states tend to be invalid. For example, `Person(isWalking=true, isAlive=false)` is nonsense, because there's an unexpressed constraint that `isWalking==true ==> isAlive==true`.

Are you implying that Undead aren't people?

Also, magical Undead states aside, I'm pretty sure it is possible for a Person to be Walking while they are not technically Alive if something else is able to control their motor system as happens in nature with various Wasps, Slime Balls, and more.

Re:Flags Are a Code Smell (2014) by shrimpx on Sunday May 22, 2022 @06:32AM (#31466711)
You make good points. Some of these "illegal" states may be legal from some other perspective, or yet-unforeseen use cases.
Re:Flags Are a Code Smell (2014) by gentleman11 on Sunday May 22, 2022 @12:54PM (#31470244)
Bug or feature?