[Gluster-devel] !! operator

Jeff Darcy jdarcy at redhat.com
Sat Apr 2 15:36:07 UTC 2016


> Thanks for the explanation. I was able to practice C for 18 years in
> numerous projects without having the opportunity to see it. I will got
> to bed less ignorant tonight. :-)

Sorry if my comment came off as dismissive.  I was only trying to
explain why I'd assume it's intentional.  I'll readily admit that
I had the exact same reaction when I first saw this construct.
>From an objective code-readability standpoint it's probably a bad
idiom.  While it is definitely concise, the syntax gives no hint
as to its intent, and it's often unnecessary.  This and the dozen
other instances of !! in our code should probably be eliminated
or replaced with a macro.  TO_BOOLEAN, perhaps?


More information about the Gluster-devel mailing list