begin quoting Darren New as of Wed, Jan 02, 2008 at 09:13:10PM -0800: > SJS wrote: > >Tracking down errors due to indentation errors is HARD. > > Um, no, not really. Neither COBOL nor FORTRAN had indentation rules > complex enough to make debugging difficult. Certain columns were > reserved for certain information, is all. You had certain columns for > labels, certain columns for "this is a continued line" or "this whole > line is a comment", and certain columns for numbering the cards (which > the compiler would ignore).
I watched a lot of people struggle a long time when indentation was just a little screwed up. > Try putting "identification division" in the wrong column in a 300-line > COBOL program. It's really not difficult to figure out where the 700 > error messages came from. ;-) Well, no, that's a short COBOL program. *Real* COBOL programs take up half a box of paper when you print 'em out. :) I worked in a COBOL shop for a few years, and I learned that it's the simplest mistakes that cause the most programmer frustration. > Seriously, who had problems with the fortran rule that code started in > column 8, and columns 1-6 were the label? Why is that worse than labels > in C that have to be followed by a colon? Most of the time it was one missing space, and whoops! Can't tell, what with comments and vertical whitespace and page breaks. The eye just glosses over... "yup, that's indented, looks good to me". Maybe it depends on the usefulness of the compiler diagnostics, which depends on the compiler... > >That's why so many languages did away with such rules. > > No, they did away with it because people stopped using punched cards > that would get out of order if you dropped them on the floor, for example. I have never written any code on punch cards. -- I won't compare war stories With people who drive lorries. Stewart Stremler -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
