Jump to content
Team Avolition
Sign in to follow this  
revan114

spacing, which do you prefer of these two?

Recommended Posts

revan114    1186

you, you preson,, you like this:

	x = ( y * 0.5f );
	

or you like this one:

	x = (y * 0.5f);
	
Edited by revan114

Share this post


Link to post
Keit1h    8

personally i go with the 2nd one, because i hate looking at super long lines of code with a fuckton of spaces. yeah with a piece of code like that it's not so bad, but as soon as you get long lines of code it's just a huge fucking eyesore.

either way, unless you're like 70 years old and can't see for shit then the extra spaces are pointless.

  • Like 1

Share this post


Link to post
revan114    1186

whats really weird is that the former is apparently ID's internal style. i really don't see the advantage.

Share this post


Link to post
widd    238

i put space between operators and variables but other things (like organizational parentheses) i keep together with no spacing

basically i ask myself "if it were a written english sentence, would I do it?"

hence equations like a * b are spaced (read as a times b), but parantheses are not because they are not spoken or read and are therefore formatting

Edited by widd

Share this post


Link to post
117    17

yeah number 2 for me.

Share this post


Link to post
Dabato    3

I would actually rather contract syphilis than use number 1.

God i hate lua I mean what?

  • Upvote 1

Share this post


Link to post
neur0net    7

Definitely the 2nd one. Can't think of any programmer I know who puts spaces between parentheses and interior variables, but I have seen it in source files from time to time. Just looks awkward to me.

Share this post


Link to post
Huxlen    0

I don't mind the spacing on the first one, but why would I use it when I could just use the second one?

Second looks better.

Share this post


Link to post
Sirenfal    4034
7 hours ago, Huxlen said:

I don't mind the spacing on the first one, but why would I use it when I could just use the second one?

Second looks better.

Shh. First posts aren't supposed to be reasonable.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×