From: "Thomas B." Date: 2008-09-07T02:35:53+09:00 Subject: Re: attr_*, *variables_* Pedro Silva wrote: > I prefer the attr* notation, but what really matters is to have a unique > invocation form. Does anyone think the same? (Did you mean 'uniform'? Or I don't understand this sentence.) I agree that it is good to have one standard, but I think that this is the case here, more or less. And the standard is to give prefixes when we perform an action on a prefixed variable, and in attr_* arguments are not prefixed simply because this action (defining accessors) involves both the variable, and the newly created method, of which the latter is not prefixed. So they chose that you sort of specify the method name and not the attribute name. I agree that writing attr_accessor :@a could be regarded as correct as well, because this would let anybody use the form they find more coherent with the rest of the methods, and it would seem more clear to a beginner (I remember my confusion when I first saw it). TPR. -- Posted via http://www.ruby-forum.com/.