Simen kjaeraas wrote:
> Jérôme M. Berger <jeber...@free.fr> wrote:
> 
>>>> for (int i = 0; i < 10; i++);
>>>>   writeln(i);
>>>>
>>>> I have seen students waste minutes locating that bug.
>>>
>>> I've seen a whole afternoon lost on that one.
>>
>>     Of course, using a decent editor will prevent it: if the editor is
>> able to handle indentation correctly, it will indent the writeln in
>> the same column as the for which makes the problem appear immediately.
> 
> No. Having been a programming teacher, I can assure you that beginners
> /will/ make this mistake, no matter how much the IDE helps them. If the IDE
> does not indent things the way they expect it to, they will 'fix' it.
> 
> Having worked with auto-indenting editors myself, I have to say they are
> the work of devils. They tend to indent seemingly at random, and choose the
> most unpleasant ways if they feel they can get away with it.
> And should you for some obscure reason want to use a different indentation
> style (say, you've downloaded some code), it will be as confused as a
> non-geek doing the motherboard dance.
> 
        Either (X)Emacs or Vim indent things properly, have completely
configurable style and work fine. For all others, I would tend to
agree. Since you use the word "IDE" in the first part of your
message, I'd say you haven't tried what I call a *decent* editor ;)

                Jerome
-- 
mailto:jeber...@free.fr
http://jeberger.free.fr
Jabber: jeber...@jabber.fr

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to