From: "Hal E. Fulton" Date: 2003-08-02T05:41:54+09:00 Subject: Re: RDoc now does constants ----- Original Message ----- From: "Dave Thomas" To: "ruby-talk ML" Sent: Friday, August 01, 2003 3:35 PM Subject: Re: RDoc now does constants > Hal E. Fulton wrote: > > > > Does this mean that Structs will now be > > documented? There was some discussion > > of this on irc last night. > > > You could do something like: > > # A Person is used to hold information on > # interested parties. > # name: the person's name > # dob: the date of birth (Date) > > Person = Struct.new(:name, :dob) > > However, for now I'm not automatically extracting Struct information: > there are too many heuristics involved. I'm also concerned that I don't > promote Structs as first-class classes, simply because when developer's > user Structs they are often not considered to be at the same level as > other classes. > > So... I thought that by adding constants I gave us all a chance to > experiment with Structs as well. If it turns out that I need to add > additional support for them too, then I'll do it. Well, call me crazy, but I sometimes create a Struct and later (usually as an afterthought) add methods to it. Personally, I see nothing wrong with this. Some, though, will perhaps say I should refactor and make my Structs into "real" classes. Hal -- Hal Fulton hal9000@hypermetrics.com