On Tue, 12 Oct 2004, Randy W. Sims wrote:

> Are there any Ruby modules that allow documentation to act as source
> code? I was thinking of the problem of how souce code sometimes diverge
> from its documentation. So maybe there could be a way to specify the
> interface: the number of arguments and their types in the documentation,
> and possibly pre- and post-conditions, and then the documentation would
> be turned into code at runtime. I guess this would be implemented
> something like Perl's source filters[1]. Possibly some constants and
> such could be defined this way as well, version numbers, etc.
>
> I'm not sure if this is a good idea or not; I haven't completely thought
> it through. It seems like I've read about this being done before in some
> other langage, but a brief search hasn't turned up anything.
>
> Any thoughts?

do a search for 'literate programming' - it sounds like what you are talking
about.

kind regards.

-a
--
===============================================================================
| EMAIL   :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE   :: 303.497.6469
| When you do something, you should burn yourself completely, like a good
| bonfire, leaving no trace of yourself.  --Shunryu Suzuki
===============================================================================