[squid-dev] [PATCH] TLS NPN updates

Alex Rousskov rousskov at measurement-factory.com
Sat Dec 19 17:31:52 UTC 2015


On 12/16/2015 04:18 PM, Amos Jeffries wrote:
> On 17/12/2015 4:34 a.m., Alex Rousskov wrote:
>> Please do not add negative ("no-something") booleans to code. It is
>> difficult to read double negations in initializations
>> (noSomething=false) and expressions (!noSomething). It is usually
>> possible to rename to doSomething (and adjust code) or, if necessary, to
>> avoidSomething (without code adjustments) to mitigate those code
>> comprehension problems.


> Changing it.
> 
> But FTR we do not use or need double negations like that. 


FTR, you were using them:

> +        flags_() : noDefaultCa(false), noTlsNpn(false) {}


YMMV, but I bet a significant percentage of code readers will
misinterpret the above or will have to pause and think before confirming
that noTlsNpn=false actually means "yes, use NPN".

Thank you for changing the code to avoid these problems.

Alex.



More information about the squid-dev mailing list