From: Markus Date: 2004-10-09T06:38:16+09:00 Subject: Re: quality of error messages Markus wrote: > The problem, as with all such systems, is that you are now looking > >at something the compiler does not. That's the main reason why salient > >structure systems such as python's measurably reduce programmer errors: > >if you use them you are perforce seeing what the compiler sees, no more, > >no less. > > > > Remember the old adage: "Don't get suckered in by comments; read > >the code" > > >P.S. Again, for the record, I am NOT advocating salience for ruby. > On Fri, 2004-10-08 at 13:45, Charles Hixson wrote: > But is that an argument against labeling end markers, or an argument > in favor of allowing Ruby to optionally recognize them? I agree that > it's a true argument, I just consider it better than nothing. So (summarizing my previous posts on this thread): * It isn't possible to give useful hints about the location of an unclosed structure with out using "out of band" information that the compiler presently does not use. Ruby is not being intentionally obtuse in its error reporting; it simply does not know, and can not know, what construct was left open in general. It can't even guess. * Therefore if we want better information about the source of "missing end" errors, we will have to let the compiler use information it does not presently have * This is (IMHO) not worth breaking any existing code at all. * A guess could be made by looking at the indentation (see http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/115641 for the details) provided * that we took into account of the fact that most people claim to use the salience rules but actually do pair-matching * No warnings should be generated (the information should only be reported in case of an actual error) * Augmenting 'end' (optionally) with a structure keyword and a name might be possible. It would certainly provide enough information, but may or may not be implementable * Having the compiler "read comments" is a Bad Idea. * I would support any of the ideas that 1) would work and 2) are not Bad Ideas. * I will argue for the truth, even if in doing so I undermine my own prejudices. No strike that. _Especially_ if it will undermine my prejudices. Does that answer your question? -- Markus