Re: [AD] Allegro's mixer, update |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
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.
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.
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. 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.
Indentation is the topic of many "holy" wars, so it's unlikely that
there will ever be a solution everyone agrees on. 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.
Hein Zelle
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<
Unix is user friendly. It's just very particular about who
it's friends are.
Hein Zelle hein@xxxxxxxxxx
http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<