Yes, but only recently. It's a bad habit I'm trying to break. Like others have stated, it's a keyword.
Poll: Spaces in if statements
11–20 of 32 posts
Re: Poll: Spaces in if statements
#12Re: Poll: Spaces in if statements
#13if ( spaces ) {
more readable code;
}Re: Poll: Spaces in if statements
#14i do it like this:
if( test == true ) {}
in python:
if test:
Re: Poll: Spaces in if statements
#15I'm surprised so many people like spaces. I was under the impression that most people didn't use a space.
Re: Poll: Spaces in if statements
#16I personally prefer if( test )
This is my personal preference too. I like that the condition is visually separated from the wrapping. I'm also prone to borderline-too-complex conditions, and this syntax makes those easier to focus on.
Re: Poll: Spaces in if statements
#17Yes, my team uses this style. Coding style is a matter of choice, and we should adapt to the style of our peers.
Re: Poll: Spaces in if statements
#18How much does this really matter? I suppose I usually use spaces, but to be honest, this isn't something I notice.
Re: Poll: Spaces in if statements
#19In C, 'if' is a keyword and a space always follows a keyword.
No.
Re: Poll: Spaces in if statements
#20I don't recall which I do, but I do know that I use less space in general nowadays than I did before syntax highlighting was basically everywhere. Anyone else change their style due to syntax highlighting?