Re: [AD] indentation

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


On Sun, 2005-08-21 at 20:56 +0200, Grzegorz Adam Hankiewicz wrote:
> On 2005-08-21, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > [...] but since the current usage of TABs just is evil [...]
> 
> I've never understood this. If you open any Allegro source file
> with notepad, a web browser, or cat it on the screen, it will
> look right. Because a tab is a low level thing meaning the same
> thing everywhere (round to next multiple of 8 columns on screen)
> and identation is a high level thing. If an editor is unable to
> deal with both concepts, isn't the editor the evil one?

The problem is, only tview applications see tab as the concept of moving
to the multiple of 8 columns.

Most editors see TAB as an "indentation marker", i.e. it moves to the
next indentation boundary, which may be 3 or 4 columns. Besides, try
viewing a diff of some Allegro source.. it will now obviously make the
first indentation only 7 chars and look wrong. E.g. here from a patch I
applied just before:

+      blit(player->saved, gui_bmp, 0, 0, player->x, player->y, player->w, player->h);
+      if (is_same_bitmap(gui_bmp, _mouse_screen))
+	 unscare_mouse();
       destroy_bitmap(player->saved);
    }

See how the line with "unscare_mouse" looks wrong?

And in an editor which uses 3 or 4 columns for a tab, it really gets
completely unintelligable.

-- 
Elias Pschernig





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