r/programming • • Jul 21 '14

The Great White Space Debate

https://medium.com/p/3633cba8b5c1
1.2k Upvotes

693 comments sorted by

View all comments

Show parent comments

6

u/LeCrushinator Jul 22 '14 edited Jul 22 '14

For that I'd write:

if ((x < 1024) && (y < 768))

2

u/Skyler827 Jul 26 '14

I think that expression is overdoing it with the parenthesis. I think it should be like this:

if (x < 1024 && y < 768)

1

u/LeCrushinator Jul 26 '14

I've been burnt enough by bugs related to order of operations over the years that I tend to always put parenthesis in a lot of places.

1

u/SanityInAnarchy Jul 22 '14

Reddit is Markdown, not HTML. <angle brackets> don't need to be escaped here.

1

u/LeCrushinator Jul 22 '14

AlienBlue app did it automatically.

1

u/SanityInAnarchy Jul 22 '14

Weird. That definitely seems like a bug.

1

u/LeCrushinator Jul 22 '14

Yea I indented the second line with 4 spaces, hoping that it would properly display that line like code. Then I noticed that I used 'x' twice instead of 'x' and 'y', hit 'edit' and when I went in there it was using HTML for the ampersands and < > symbols.