[#2367] Standard libraries — Dave Thomas <dave@...>

From ruby-dev summary:

60 messages 2004/02/11

[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>

Index: cgi-lib.rb

15 messages 2004/02/12

[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>

This is a common approach I use to object initialization; I don't know

24 messages 2004/02/19

Re: Standard libraries

From: "Sean E. Russell" <ser@...>
Date: 2004-02-12 16:19:18 UTC
List: ruby-core #2410
(Dave Thomas: there's a question for you in the second paragraph; if you're 
not following this thread, would you please at least scan that paragraph?  
Thanks!)

On Thursday 12 February 2004 09:59, Gavin Sinclair wrote:
...
> > Basically, the code duplication that Hiroshi is complaining about is
> > required for good documentation, because there's no other way of
...
> Good points, but I don't see the light overall.
>
> Method documentation is neccesary to help people understand the code -
> I agree.  Without type information it can be hard to understand a
> method at a glance.

Sorry, I wasn't being clear.  I was trying to say that Hiroshi doesn't like 
code duplication, but there is no way to avoid the kind of duplication he's 
complaining about because there's no other way to extract that information 
automatically.  Ergo, if you want good documentation, you'll *have* to have a 
certain amount of duplication -- although, I wouldn't call it duplication; 
I'd call it documenting constraints.  Even so, it *is* difficult to keep 
those constraints in sync.

I remember having a discussion with Dave about the possibility of having rdoc 
extract constraints from the documentation and generating or running them in 
the form of unit tests.  Dave, I'm a bit out of touch with what you're up to 
these days; have you given this any more thought?

Also, since I'm a lazy cuss, does anybody know what the consequenses of having 
Ruby source files that consist of enormous amounts of comments is?  I'm 
assuming that the parsing out of comments would add a not inconsiderate 
amount of time to the loading of files, but since that only happens once per 
run, can it be ignored?   I'm just imagining some literate programming style 
that's 90% comments, and wondering what the overhead would be considering the 
dynamic nature of Ruby.

-- 
### SER   
### Deutsch|Esperanto|Francaise|Linux|XML|Java|Ruby|Aikido
### http://www.germane-software.com/~ser  jabber.com:ser  ICQ:83578737 
### GPG: http://www.germane-software.com/~ser/Security/ser_public.gpg

In This Thread