[Date Prev] [Date Next] [Thread Prev] [Thread Next] Indexes: Main | Date | Thread | Author

RE: [ba-ohs-talk] Leo Literate Programming


Nice critique, Eric.  I share your observations about always imparting
information and having the structure be apparent.  I haven't looked at
Literate Programming enough, and not recently, to see how that is handled
generally, if at all.  I remember when I first read the TeX documentation
that I found something distracting about it.    (01)

With regard to something like conditional structure, I think you may be
pointing out something that may be difficult for Literate Programming to
deal with, and that is when the semantics of the exposition and the program
structure are similar or super-imposed.  That is, when program logic becomes
part of the exposition logic.  I am not sure there is a clean way to control
this by other than some manually-applied hack.  I don't recall any
discussion of this case, yet I would think it crops up a lot.  I will keep
my eye out for anything that is available on this.    (02)

Nonetheless, Leo seems valuable to explore further.    (03)

I am accustomed to the Python style, and enjoy it (as I do Peter Landin's
indentation styles), but it is painful if you are generating code from
another program, too!  Something canonical like an XML structure has been my
way of dealing with that, if it is where I have anything to say about it.
(Shades of exTenDE! ;)    (04)

-- Dennis    (05)

-----Original Message-----
From: owner-ba-ohs-talk@bootstrap.org
[mailto:owner-ba-ohs-talk@bootstrap.org]On Behalf Of Eric Armstrong
Sent: Wednesday, August 28, 2002 18:56
To: ba-ohs-talk@bootstrap.org
Subject: Re: [ba-ohs-talk] Leo Literate Programming    (06)


Oh, yeah. This could be *big*. Maybe even BIG.    (07)

Two major points:
   * Python depends on indentation to define nesting. But indentation
      can be hard to keep consistent in a text file, especially when you
      move things around.    (08)

[ ... ]    (09)

  * Personally, I've never had much use for the "header is different
     from the body" style of outlining. But when the header is a
     readable comment, I might relax that position.    (010)

     Personally, I would still rather see this style, which is reflective
     of the way Augment was implemented:
           + header<nl>
              body of header (if any)
              + subheader<nl>
                 body of subheader    (011)

     where the header is just the first line of the entry. That makes it
     possible to put in a multi-line comment, for example, where the first
     line captures the essence, and subsequent lines expand on it.
     (I think that style is better whenever multi-line comments are the
      norm, as in Java's API comments.)    (012)

[ ... ]    (013)