[bind10-dev] [bikeshed] "variable == value" vs "value == variable"
JINMEI Tatuya / 神明達哉
jinmei at isc.org
Fri Mar 23 17:36:38 UTC 2012
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.
---
JINMEI, Tatuya
Internet Systems Consortium, Inc.
More information about the bind10-dev
mailing list