From: Mark Volkmann Date: 2006-02-14T04:33:25+09:00 Subject: Re: Struct creates non-standard classes On 2/13/06, David Vallner wrote:> D�a Pondelok 13 Febru�r 2006 07:14 Hal Fulton nap�sal:> > Once I wanted to construct a simple class, so I used Struct. Later I> > decided I wanted to add a custom method to it. I discovered then that> > the attributes did not correspond to instance variables. I had to> > re-write the class instead of using a Struct.> >>> Hmm. Can you give an example where you absolutely need to access an instance> variable instead of using the getter / setter? I think the main use would be for writing tools that help Rubydevelopers. For example, I might want to write a tool that inspectsRuby objects in a running program. I might want to ask "What data doesthis object hold?". In order to answer that question, I'd have to knowwhether the object was created from a "normal" class or a struct. --R. Mark VolkmannPartner, Object Computing, Inc.