Hi,
Sometimes I end up with a double negation when selecting in a Boolean case structure:
Double negations are notoriously hard to understand and thus a source of misunderstandings. Therefore I most often eliminate such double negations by dropping in a Not operator:
For these situations it would be nice to be able to invert/negate the case selector by right clicking on it, just as with several of the built-in Boolean functions:
I'm not concerned about performance, as I'd expect the compiler to compile the bottom two cases equivalently. It's more that you're forced to move nodes about less in the suggested case, if you find that you have to negate the case selector.
The drawback obviously is that you move away from the expected behavior of a case structure, but I think it's a small tradeoff. There are many good ideas floating around the Idea Exchange which touches on the subject of negating Boolean inputs that you currently cannot negate, but I couldn't find one that suggests negating the case selector, and I have needed that many times...
Cheers,
Steen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.