Robert Klemme wrote in post #1081589:

>>   s = S.new(0)
>>   p s.a    #=> 10 WRONG!!!
>>   s.a = 100
>>   p s.a    #=> 105
>
> Igor, that was not my code.  Your claim is wrong.  I posted this
> upthread:

I consider this red herring, and in continuation you actually repeat,
your half-way solution in which 'initialize' is using straight
assignment rather than expression 'n + 5'! You again ignore the
requirement that both 'initialize' method and the accessor (setter)
method initialize the variable in identical fashion! It is you who is
not sticking to the facts, and who is drawing attention away from the
real issue, which is the fact, that Struct does not allow you to define
custom accessor getters, and should not be used when these are needed.
All my examples very consistently show both sides of the story!

> should be taken out of the language.  You are free to use or not use
> Struct based on your judgement, but please refrain from claiming that
> Struct is useless, harmless or should be removed from the library on
> such weak evidence.

These are your conclusions and inaccurate interpretations of what I
actually said. Struct indeed is ill suited for the case which I have
presented, which BTW is not at all weak evidence as you would like the
ignorant to believe!

We are spending way too much time on your interpretations of what and
even how things are discussed here. I clearly defined what is required
and where Struct is breaking away from Ruby language rules. I also
stated that we all can tolerate this glitch. However, it is precisely
because of such attitudes towards questionable practices, as you are
constantly demonstrating here, that it would be best if Struct was
pulled out of Ruby all together or fixed, because the way it is
currently implemented for limited use, I may add, only provides basis
for badmouthing this magnificent language. This is my opinion and I you
certainly have not convinced me that I am wrong.

Take it easy,
igor

-- 
Posted via http://www.ruby-forum.com/.