Author Topic: Hard tabs or soft tabs?  (Read 10602 times)

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Hard tabs or soft tabs?
« on: December 15, 2005, 06:45:28 am »
This thread is not about your personal preference. It is about what the C::B project leaders decide will be used in this project.

There are lots of inconsistencies in the C::B source. Even single functions will sometimes go back and forth with hard tabs or soft tabs 5 times.

The project leaders need to make a decision on what the official tab setting for C::B source will be. Then, from here on out people will be expected to use that format. Right now things are so scattered I didn't know which one to use at times. I tried to use the format that the majority of a given file was in when I started. The sdk/ directory alone has many files with mostly hard tabs and many files with mostly soft tabs.

I will not even state my personal preference here. I am just waiting for an answer from rick or thomas or mandrev (sp?) as to what I should use.

I bolded those lines to emphasize that I'm only looking for an answer, not looking to start an argument.
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Hard tabs or soft tabs?
« Reply #1 on: December 15, 2005, 10:20:01 am »
There is only one project leader, and the Ring answers to him alone. :lol:

Anyway. When I started working on Code::Blocks, Yiannis asked me "About coding style, could you please do this... and that..." and I replied "Oh darn, I am doing my formatting using the AStyle plugin...". So he said "just set the style to ANSI and you'll be fine".

Since that day, I am using the code formatting plugin in ANSI mode for all sources that I write new. Basically, I run AStyle every time before saving, and I do not spend a thought on formatting at all any more. It works just fine.

Usually I don't reformat existing sources though, even if they are not compliant (unless it happens by accident). This is because reformatting them will give really huge diffs in revision control even though nothing has been changed. Maybe that should be done on all sources nevertheless, but this is not my decision ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Hard tabs or soft tabs?
« Reply #2 on: December 15, 2005, 10:51:41 am »
I personally use 4 spaces instead a single tab. You 're free to use a tab though. Just make sure it equals 4 spaces.
Be patient!
This bug will be fixed soon...

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: Hard tabs or soft tabs?
« Reply #3 on: December 15, 2005, 12:57:29 pm »
Usually I don't reformat existing sources though, even if they are not compliant (unless it happens by accident). This is because reformatting them will give really huge diffs in revision control even though nothing has been changed. Maybe that should be done on all sources nevertheless, but this is not my decision ;)

Yes that is irritating. That's why I only changed lines right around what I was working on but maybe I shouldn't have done even that.  :?
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool: