RE: [AD] Suggestions

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


Title: RE: [AD] Suggestions

Grzegorz Adam Hankiewicz writes:
> It's the other editors which force tabs to a not standard
> number of spaces which are 'bad', 'evil', 'inferior', whatever
> Shawn prefers to call them ;)

The biggest problem with most text editors is their notfedness :-)

Seriously, it's a real dilemma how to format code for reliable
distribution. I think the best thing is to fit in with accepted
conventions on whatever platform you use. In Unix, that
generally seems to be that tab characters are displayed as
8 spaces, but code can be written using whatever indent amount
it likes and can mix tabs and spaces however it likes in
confidence that everyone will display it correctly (I very
rarely come across Unix sources that don't display correctly
with 8 space tab settings).

In Windows, and most commercial game development, on the other
hand, people tend to assume that tabs are 4 spaces, and usually
indent with tabs instead of spaces. So when working on that
sort of code, I set things up to fit in with that convention.
Makes life easier if you match up with what everyone around
you is doing, and nothing is quite as annoying as trying to
read code where the indentation is all screwed up.

(wish: it would be nice if the tab character didn't exist,
files were all stored as spaces, and it was up to the text
editor to provide a good user interface for editing indents
while the underlying data was always raw spaces. That way you
could use whatever convention you liked for your own files
while still being sure that other people's would display
as they indentended).


        Shawn.



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