On Sunday 22 February 2004 21:56, Mathieu Bouchard wrote:
On Sun, 22 Feb 2004, Larry Troxler wrote:
I brought this up a while ago, complaining about people still using hard tabs in source code. [...] but hard tabs are very, very bad, unless you're programming on a C64 and need to conserve floppy space.
You make it seems like it was a completely outdated that only a few rare programmers would use, out of nostalgia. However many rather recent (and sometimes huge) projects have hard tabs as their only allowed indentation.
IMO If a programmer insists on using hard tabs, he or she should put a comment at the top of the source file specifying the tab spacing.
There are two usual ways of thinking of hard tabs:
- One tab per indentation level. All hard tabs are at the beginning of
lines: no tabs in the middle. This allows the tabwidth to be customized to whatever value without the code looking too weird.
That's a nice ideal, and is in fact what the hard tab character was intended to be used for, but show me a project which follows these guidelines, and doesn't in fact mix hard tabs and spaces. I guess you'll throw the linux kernel source at me ... :-)
- The church of EMACS: hard tabs don't exist in the editor, but they
are used in files to save space. Tab width is always 8 here.
Terribly brain-damaged, that. The very essence of the tab character is that it is up to the renderer to decide the indentation level. That in itself would be fine, except that it gets misused, for example, to line up expressions that are too long for one line. I already have to work on legacy projects at my day job, where people have in the past used hard tabs set to 2, 3, or 4 spaces; You're telling me that I now have to also consider 8? I'm tired of playing this game.
I don't know if this is the problem in this case. In the mean time, someone mentioned a switch for CVS to ignore whitespace - I don't remember it this applied to checkin, checkout, or both. Really, whitespace and newline differences should be none of the version control system's business, but I don't know how Sourceforge is configured by default.
What do you mean that it's none of its business, that it should ignore whitespace, or that it should not change from its current behaviour? And if the latter, why wouldn't that be a good idea?
CVS should ignore whitespace differences.
Cheers!
Larry