[bind10-dev] [bikeshed] "variable == value" vs "value == variable"

Warren Kumari warren at kumari.net
Sat Mar 24 15:33:09 UTC 2012


On Mar 23, 2012, at 6:36 PM, JINMEI Tatuya / 神明達哉 wrote:

> At Fri, 23 Mar 2012 18:24:30 +0100,
> Warren Kumari <warren at kumari.net> wrote:
> 
>>>>>  if (10 == x) {
>>>> 
>>>> Do we really have this in our code? That looks strange to me and confusing.
>> 
>> Just FYI, this is common practice in some venues -- while it looks confusing, it helps prevent the:
>> 
>> if (x=10) { 
>> 
>> problem -- basically, by putting the literal first, you get a grumpy compiler then trying to assign to it…
> 
> Yeah I know.  In the very first message of this thread I explained I
> understood it but why I was still against that style.

Sorry, so you did… That'll teach me to read mail while jetlagged…

W


> 
> ---
> JINMEI, Tatuya
> Internet Systems Consortium, Inc.
> 

--
Don't be impressed with unintelligible stuff said condescendingly.
    -- Radia Perlman.







More information about the bind10-dev mailing list