3 ms·
That's mathematically equivalent to "y is a subset of x", which is obviously right. (Except for the wrinkle that y is a dict, not a set.)
by yorwba 7y ago
That's mathematically equivalent to "y is a subset of x", which is obviously right. (Except for the wrinkle that y is a dict, not a set.)
- gridlockd 7y agoI don't disagree. Try to mute your "mathematical thinking" for a second and read it as an ordinary person, with a focus on practicality. It just doesn't look right. If it did look right to me, I wouldn't be sitting here typing this all out. I would be silently agreeing with the mathematical point of view. That's what tells me this is a likely source of confusion and error.
- umanwizard 7y agoI simply don’t have the intuition, at all, no matter how I think about it, that it should be false. Is there any language that works the way you’re suggesting is more practical/intuitive?
- gridlockd 7y agoI'm not saying it should be false. It's the law of the excluded middle that forces us to make a true/false decision, in which case I can agree that, for mathematical reasons, it should be true. For practical reasons, it might be better for it to be false. That would require some empirical research on whether this could actually prevent harmful behavior in practice. From a design perspective, I would argue that "all" should not be defined for empty lists, because that forces people to consider whether the often-forgotten "empty list" edge case might cause an issue.
- ulucs 7y agoReplying to the sibling comment, We invented mathematics because practical thinking leaves us without answers at some points. You are free to axiomatically choose "all([]) = false", but then you'll find out that many mathematical equivalences won't hold as they all assume only the ZF axioms.