Thanks for sending out minutes!
Martin Roth wrote:
- How do we feel about changing the coding style to move constants in
comparisons to the left side? if (0 == x) instead of (x == 0)
- The argument for doing this was that this style finds errors in any environment
- Ron is very opposed.
Oh Ron, don't be so lazy. ;)
It's a fantastic way to avoid errors. I have adopted this style and it's one of those rare things which is annoying for maybe a week, but goes on to benefit both you and everyone else forever after.
I encourage everyone to adopt it. You know, try it out for a week on personal projects; challenge yourself to get used to it.
Hope you're having a good weekend!
//Peter
On Sat, Mar 18, 2017 at 10:13 AM Peter Stuge peter@stuge.se wrote:
Oh Ron, don't be so lazy. ;)
that's not my reason. I just proposed the (const == var) form on another project I'm on and it turned into a real storm, and reasonable arguments were presented about why it's not that great an idea. I am also allergic to rewriting large swathes of code without a really solid way to test everything that's changed. I've already seen what happens when an enthusiastic vendor makes global changes to code they can't test. No script or compiler is perfect. It should 'just work', of course, but we know how well that goes in practice.
There's a lot more to it than 'ron is very opposed'.
ron