From: Csaba Henk Date: 2005-01-17T18:21:06+09:00 Subject: Re: Fwd: [suby-ruby] Your all time desired fundemental Ruby mod On 2005-01-16, Austin Ziegler wrote: > On Sun, 16 Jan 2005 18:21:08 +0900, Csaba Henk > wrote: >> (With appropriate docsstring syntax, the interpreter could either regard >> them as comments or attach them as variables to the corresponding class >> or method [depending on options], so the "memory burden" argument is not >> valid.) > > No, "memory burden" is quite valid. Come up with a clean way for Ruby > to have docstrings, but yet easily allow someone to dump them if > necessary. I find I rarely use Ruby for serious work interactively > (e.g., I do so when verifying stuff). In this case, I feel that it's > probably better that we have the ri/irb integrations that are ongoing > than docstrings. In fact, the present rdoc syntax would suffice. Just integrate rdoc with ruby, as follows: depending on a commandline option and/or an environment variable and/or requiring some stuff, the interpreter either treats the rdoc stuff just as it does now (so in this case no memory burden), or parses and attaches them as instance variables to Modules/Classes/(Unbound)methods (and we would have the appropriate accessor interface to query these variables). The default would be running with docs turned off, so if you don't use ruby interactively or for some other reason you don't like the idea, you just could ignore the whole issue and you'd feel no change. Csaba