From: Charles Hixson Date: 2004-10-09T05:59:51+09:00 Subject: Re: quality of error messages Markus wrote: > The problem (as I responded before) is that this would complain >about almost everyone's code since (*smile* I presume because you are >all unwashed heathens, but there, may be other reasons) people tend to >follow the "match pairs" rule instead of tucking the "end"s in as the >last item of the block. > > The rule as everyone states it (including here) would object to the >ends being at the same indentation as the "containing" structure, which >is where pair-matchers put them. People _say_ that they indent >according to salience, but in fact they pair match. > > So, in summary, I suspect that I would be happy with this rule but >almost everyone else would be happier with the modified (< vs. <=) >version I suggested earlier on this thread, which would allow: > > starting thing > guts > intestines > gizzards > end > >instead of the salient form: > > > starting thing > guts > intestines > gizzards > end > >which would be expected by the rule as stated. > > -- Markus > > OK. You're clearly right in my case, as I tend to indent with this pattern (in C, etc.): if (something) { a block of stuff } else { a different block of different stuff } which few seem to use. For me one of the disfeatures of Ruby is that the block start must be on the same line as the test for block start (unless one takes extra steps). I find this a continuing irritation, even while I understand that the parser needs to know that there is a block coming. So Ruby already violates my desired indentation pattern. An additional violation would probably not be much additional irritation.