--------------------------------------------------------------------
Archive-Date: Tue, 22 Dec 1992 22:11:40 CST
Date: Tue, 22 Dec 92 21:31:43 -0500
From: m-lp9966@DOC.CS.NYU.EDU (Lewis Perin)
Reply-To: LitProg@SHSU.edu
Message-ID: <9212230231.AA07088@DOC.CS.NYU.EDU>
To: LitProg@SHSU.edu
CC: LitProg@SHSU.edu
Subject: OO Literate Programming?

I think my experience bears on the issues raised in Paul Lyon's
thoughtful posting.  I've been writing C++ WEB code for several months
now in CWEB (mostly) and FWEB.  The rough conventions I've used seem
to avoid the woes of a `monolithic' approach to C++-WEB.

The basic idea is to keep separate source files for a class's outer
spec (meant to be included in any file that uses it directly) and for
the class's implementation (seen only in the listing for that
implementation.  Say the name of the class is X; then the spec file
would be xh.web, the implementation would be x.web.  If class Y is
derived from X, then yh.web will include xh.web.  If z.web is the overall
application source, it will include yh.web directly (and xh.web, of
course, indirectly.)

C++ adepts will by now have thought of plenty of corners of the
language this simple technique fails to touch, but it does get a lot
of work done while weaving output that's about as coherent as I ever
get.

Hope this helps, Lew
--------------------------------------------------------------------