4 ms·
The propositions that are true. If a or b delete it becomes weird when both are true, because in conventional programming languages, b often isn't executed at a
by superice 9y ago
The propositions that are true. If a or b delete it becomes weird when both are true, because in conventional programming languages, b often isn't executed at all, since we don't care about the value of it. However, in this case you do need to execute it because you have to know if delete it reflects on a or both a and b.
- vorg 9y agoIf you want to delete both if either is true you could write: If (a == 3) || (b == 4) delete them
- dnautics 9y agowhat if you want to delete a on the b condition?
- vorg 9y agoIf there's one condition, use `it`. If there's two, use `this` and `that`, i.e. if (a == 3) || (b == 4) delete this //to delete a and if (a == 3) || (b == 4) delete that //to delete b
- dnautics 9y agoWhat if there are three? Also this should refer to the temporally closer element, so your choices are backwards.
- vorg 9y agoInstead of `it` for one, and `this` and `that` for two, use `este`, `ese` and `aquel` for three (from the 3-tier pronoun system in Spanish). Please don't ask what if there's four. Very few (if any) natural languages have more than 3 tiers of demontrative pronouns, so computer languages shouldn't -- if they're using ideas natural language to be more readable. They would use identifiers or numeric subscripts instead.