1 |
Hello, |
2 |
|
3 |
There is apparently a difference of opinion among Gentoo developers |
4 |
concerning the use of tabs and spaces. I realize this is a topic as |
5 |
dear to the hearts of developers as Gnome vs. KDE, and Vim vs. Emacs. |
6 |
So I approach it with some trepidation. Nevertheless, I've been |
7 |
frustrated by the current practice, so I'm going to propose my opinion |
8 |
and hope that this thread won't persist long on gentoo-dev. |
9 |
|
10 |
The current practice appears to be to set tab stops at 4 characters. |
11 |
The alternative I suggest is to leave tab stops at 8 characters, but use |
12 |
4-character indentation (or allow developers to choose their own |
13 |
preferred indentation). |
14 |
|
15 |
Here are my reasons: |
16 |
|
17 |
1. 8 characters is the default tab stop for ALL mono-spaced |
18 |
applications. That includes all editors, viewers, and printing |
19 |
programs. To use a different tab width requires reconfiguration of |
20 |
every program. |
21 |
|
22 |
Note: You can't reconfigure "cat". And no, I don't want to alias cat |
23 |
to "expand -t 4". |
24 |
|
25 |
2. Modern editors supply users with the ability to use an indentation |
26 |
that differs from the current tabstop setting, in case you want to |
27 |
use something other than 8 characters. For example, Vi has the |
28 |
"shiftwidth" setting. Vim offers the "smarttab" setting, which makes |
29 |
things even more comfortable. |
30 |
|
31 |
I am certain that Emacs offers similar settings, though as a Vi(m) |
32 |
user, I can't cite them. |
33 |
|
34 |
3. If you use this method, then your ebuilds/code will always look |
35 |
right, regardless of what method you use to view them. You can edit |
36 |
an ebuild by any developer, and you don't have to wonder... "Did they |
37 |
use spaces instead of tabs? Did they mix them? What was their |
38 |
intended tabstop (which can drastically affect the appearance of text |
39 |
tables)?" Instead, it JUST WORKS. |
40 |
|
41 |
I'm not trying to settle on an indentation scheme here. Sure, that |
42 |
might provide even more comfort and consistency in the ebuilds, but it |
43 |
infringes on the developer's personal preferences more than I would |
44 |
wish. I simply would like tab characters to be the standard 8 so that |
45 |
editing/viewing/printing programs can work without needing to tweak each |
46 |
one. |
47 |
|
48 |
What do you think? |
49 |
|
50 |
Thanks, |
51 |
Aron |