Re: [AD] Allegro's mixer, update

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hein Zelle wrote:
Chris wrote:


WHy force people to use a specific tab size? If you're going to change it, why don't you make it so tab==indent, and if you need spaces, use spaces, not tabs.


Well, that works in theory, but the problem is that it changes the
looks of a file when you don't open it in a clever editor, but for
instance using "more" or "cat" in unix, or "type" in DOS. Such
programs that aren't designed for source code and don't know anything
about indent levels, will generally print 8 spaces when they encounter
a tab.

Why would you use cat, more, less, or type to read source code? The only reason I can think of would be to take a quick glance, in which case I don't see it as a big problem that indents may be a little too wide.

So, while I agree that the 3 spaces indent and tab=8 is probably
annoying (I am used to 4 space indents myself) what you propose may
be worse, unless you either force everyone to ALWAYS use tabs for
indentation, or everyone uses an 8 space indent. If not, code won't
look properly indented unless opened in a "smart" editor.

As has been already mentioned, any editor worth its salt can change the tab size(hell, even DOS 6.22's edit.com can). The difference is, you wouldn't be forcing anyone to use a specific tab size, so they can use their custom tab size and be happy.

The solution, I think, is to train your editor to do the "right
thing", and adapt to the allegro convention, whatever it may be at any
time. Decent code editors (which does not mean you have to like them)
like emacs, vi, SED and many others can be configured to let TAB mean
8 spaces, and use a custom indentation size.

My editor, SciTE, does allow me to change tab size, and probably indentation properties. But it's a PITA since I have to log in as root and use nano to edit the config file (since the config file is root, and I can only run console programs as root).

If you don't have the
luxury of such an editor, you can always get indent
(http://www.gnu.org/directory/devel/editors/indent.html) and use it to
go from allegro-format to your own format, and back.

I'll look into it, but it already sounds a bit complex.

Indentation is the topic of many "holy" wars, so it's unlikely that
there will ever be a solution everyone agrees on.

In the end, I don't really care what anyone indents with (within reason). But assuming the size of a tab, and using a tab as a multi-space replacement, is a big nono for me.

With the right tools
however, it can be made easy for everyone, as long as you're willing
to look at code in a format which is not your own favourite.

Well, as I said I ran a search and replace to replace tabs with 8 spaces and things look better. But I just think it's an unnecesarry step due to person preference (that 1 tab == 8 spaces, and be damned if anyone wants anything else).

I can see how indentation preferences can turn into "holy" wars, but I don't see why forcing a tab size should be that important to Allegro.

- Kitty Cat




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/