From: Joel VanderWerf Date: 2003-06-01T08:04:16+09:00 Subject: [RCR] attr_reader :foo? Would it make sense for attr_reader and friends to associate :foo? with the attribute "@foo" ? Consider the following code: class C attr_accessor :foo? def initialize @foo = true end end c = C.new p c.foo? # ==> false c.send("foo?=", true) p c.foo? # ==> true p c.instance_variables # ["@foo"] You can call the reader. You have to bend over backwards to call the writer. You cannot access the attribute itself from within method definitions. You can't even see that it exists using #instance_variables. Since the use of attr_accessor construct is so pointless in this case, why not change the semantics: "attr_reader :foo?" defines a method #foo? which gets the value of @foo, "attr_writer :foo?" defines a method #foo= which sets the value of @foo. This would not affect existing code because currently attr_* can't effectively be used on a symbol ending in "?".