6 ms·
One of my pet peeves is in there: DisallowTCP = false Negating negatives is always more difficult to understand and more likely to be error prone. Why not
by rogerbinns 13y ago
One of my pet peeves is in there:
DisallowTCP = false
Negating negatives is always more difficult to understand and more likely to be error prone. Why not just this, with the default being false.
AllowTCP = true
- maw 13y agoYou shouldn't not disallow no quintuple negatives neither.
- pantalaimon 13y agoI have the feeling that the default used to be true, and when the default was later switched to false, it was done by this option to not change the behavior of legacy configurations.
- rogerbinns 13y agoMy problem is what is on the left side of the equals sign. It is already a negative ("Disallow") so the value on the right side is negated.
- eterm 13y agoWhile I can't speak to this example specifically, in general: The issue is what happens if the line is missing entirely? If the default is to allow, then adding a line "allowTcp= true" hasn't actually changed your config. And deleting a line "allowTCP = true" doesn't stop allowing TCP, which could be confusing. What the addition of the line does is actually disallow TCP. The above is the kind of reasoning that causes configs to end up with double negatives.
- rogerbinns 13y agoThe solution is very simple in my eyes - do not include a negative on the left side, and pick the default on the right side to match intentions. These cases seem to have happened the other way around - values/meaning are picked for the right side first, which then requires contorting the left in order to match intentions.
- sigjuice 13y agoI cannot fail to disagree with you less :p