On Sun, 22 Feb 2004, 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.
(quoting notes.txt): -------------------------------------------- 1.5. Spacing. Tabs are 8 spaces; indentation is 4 spaces. Indenting curly brackets are by themselves on their own lines, as in:
if (x) { x = 0; }
Lines should fit within 80 spaces. -------------------------------------------
So the rules are set. Although IMO it leaves a bit room for interpretation, but I understand it as using spaces only.
Guenter
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.
- 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.
Frankly I'm more of a (1) guy, and so is (for example) the source code of the Linux kernel... but even then, playing around with a lot of different projects (many of which CVS'd), one cannot have everything in his own indentation style, and in a CVS context it pays more to keep each chunk of code in whatever format it's written it.
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?
Mathieu Bouchard http://artengine.ca/matju
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev