On 02/02/2017 11:09 AM, Marek Polacek wrote:


It seems to me that we should be able to write these expressions
the way that's natural to us and at the same time be able to
comfortably read them both ways.  As always, I fully support
consistency and following a coding style where it matters.  I
just don't think this does.

I find these harder to read and they always give me a pause, especially with >= 
or
<=.  I'd say that 99% of the codebase uses "obj >= 0", so we should fix the
rest and be consistent.
Exactly.

I liked the CONST == VAR style because it makes it impossible to typo = instead of ==. I wanted to see how it'd play out so I didn't initially call the nit out to be fixed. But I'm finding that consistently I'm having to double-take on conditionals where the constant was first.

Personal style sometimes takes a back seat to project consistency. And as Marek points out, the vast majority of conditions in GCC are written as variable op constant.

It's time to bring consistency into the sprintf checking bits.

Jeff

Reply via email to