From: Dave Thomas Date: 2004-11-12T04:46:04+09:00 Subject: Re: ruby idiom for attribute definition? On Nov 11, 2004, at 13:29, James Edward Gray II wrote: > > For what it's worth, I think the Struct is better OO design. I'm > firmly in the "Ask for help, not information." camp of OO programmers, > so I try to avoid "getters/setters" whenever possible. > > A Struct on the other hand is just a record holder to my mind, so I > have much less problem with using it in a case like this. Exactly - that's what made me suggest it. A class with a large number of attr_accessors is not really an encapsulated class, so it felt to me that a Struct would be more appropriate. I almost suggested using a Hash... :) Cheers Dave