One document about Go
"Jérôme M. Berger"
jeberger at free.fr
Wed Jun 2 12:05:21 PDT 2010
Simen kjaeraas wrote:
> Jérôme M. Berger <jeberger at 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:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100602/41b38654/attachment.pgp>
More information about the Digitalmars-d
mailing list