From: Joachim Wuttke Date: 2004-10-07T00:02:37+09:00 Subject: Re: quality of error messages Sorry, there was a misprint in the crucial line of my last mail. Here comes the hopefully correct version: > Encouraged by your quick response, I try to explain better > what I meant in example 2: > > class Foo > attr_reader ... # here I forgot :pos > def initialize > ... > @pos = ... > end > end > ... > blabla = someClass.someMethod.link_to_another_class.methods_pos.pos > > => system complains "no such method" > > Formally, the system is right: I forgot to declare the read > access method for the variable pos. > > But: > (1) the system should tell me which method in the above > chain causes the problem > (2) as a naive programmer, with a background in other languages, > I do not think of pos as method. I think of it as variable. > Once the system does not find a method, it could check whether > there is a local variable of same name, and then print out > an error message like > "no method 'pos', no read access to local variable 'pos'". > > Joachim