3 ms·
> 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,
by merlincorey 4y ago
> 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.
- shrimpx 4y agoYou make good points. Some of these "illegal" states may be legal from some other perspective, or yet-unforeseen use cases.
- gentleman11 4y agoBug or feature?