This project is read-only.

Tabs or spaces

Nov 26, 2009 at 8:58 PM

I noticed that most of the code in EnhSim is using spaces for indentation, but recently changes have been done using tabs for indentation.  Do we want to keep things common using either tabs or spaces, or do we just not care?  I've been converting the tabs back to spaces as I go, but I figured we should get consensus on this.

Nov 26, 2009 at 10:07 PM
Edited Nov 26, 2009 at 10:10 PM

Well, that's probably something I did. I didn't really think about it but just use tabs because I don't know any better... I agree that that was probably not that smart without discussing it. I don't know how others feel about this but I prefer the tabs. If others disagree I will obviously use spaces as well but if others don't really mind I wouldn't mind to format the rest of the code to tabs:P

Nov 26, 2009 at 11:59 PM

Personally I prefer tabs too - with a 4 space indent, I find the 2 space indent currently used too fiddly and unclear.

Nov 27, 2009 at 3:20 AM

I agree that the 2 space indent doesn't give enough white space to clearly break apart code blocks.  I'd much rather go with 4 spaces for indentation, if for no other reason that 2 spaces is so atypical.  Personally, I'd rather just go away from tabs to only using spaces since it makes the indentation unambiguous.  I've seen some tools default to 8 spaces for tabs, and that makes diffing file less than optimal.

In any case, we should just decide on a common format going forward.  In the meantime, I'll just keep using the existing styles in the files.  The old 'when in rome' philosophy.

Nov 27, 2009 at 3:52 AM

I'd be fine with either.  I'm used to using 4 spaces for a tab from work and I'm pretty sure there's an option in there somewhere to get Visual Studio to convert on save.

 

Nov 30, 2009 at 1:59 PM

Well, one thing we can agree on is that 2 spaces isn't enough... but then again, do we use spaces or tabs. I prefer tabs, the whole idea of tabs is that when you have multiple people working on the same code they can all set their own indentation.