**RUntime Formatting Function** (acronym expansion subject to change) [APN] 2009-02-18 Ruff! 0.1 has been released. See [http://woof.magicsplat.com/ruff_guide]. Ruff! is the documentation generator included with [Woof!] but can be used to document any Tcl programs (8.4+). Unlike other source documentation systems, Ruff! generates documentation using runtime introspection. This has several benefits: * Less clutter in the source - no extraneous markup like FUNCTION: or @class as hints for the document generator * Less duplication and hence less errors - for example, [namespace]s, defaults etc. are automatically and correctly picked up. * Documentation can be picked from comments placed next to the corresponding program logic making the code easier to read as well as making it easier to keep documentation in sync. * The benefits are even more when documenting classes as documentation can automatically include inherited classes, mixins etc. * Even program elements with no comments can be documented to provide useful information (eg. default values, parameter sequence, contained methods etc.), particularly if names are well chosen. The Ruff! man pages at [http://woof.magicsplat.com/manuals/ruff/index.html] are an example of output generated by Ruff! via NaturalDocs. Sample Ruff! documentation for [TclOO] classes is at [http://woof.magicsplat.com/manuals/ruff_sample/index.html]. The Ruff! (blog) user guide is at [http://woof.magicsplat.com/ruff_guide]. ---- [AMG]: Looks very exciting! I can't wait to see the code for this. I'll be happy to start using it in my projects. Many years ago I had thought of writing a documentation generator, but it had not occurred to me that I could harness [Tcl]'s vast [introspection] capabilities. As a result, it would have been extremely limited, doing nothing more than extracting specially-formatted comments (while ignoring the actual code) and dumping them to [HTML] or similar. It would have allowed me to interleave code and documentation, but it would also have required that the documentation effectively duplicate the code. Side note: On this Wiki, be careful with words underlined with ==='s, when the words are three or six characters long. The underlines may be interpreted to start or stop a block of preformatted text! '''RU'''ntime '''F'''act '''F'''inder? ---- I think that RS's [docstring] is noteworthy here, it's a concise demonstration of the mentioned introspection capabilities to document Tcl source. '''-- Effe''' [APN] Hmmm... that's only ten lines. I better go figure what the other 2490 lines of my code are doing! ---- !!!!!! %| [Category Documentation] |% !!!!!!