User:Ans/lp

Some note on literate programming.


 * Literate Programming - Issues and Problems

noweb
< >= // comment ...    "...... bad programming style - -'     < >= // unwanted comment     ....."
 * other implementations
 * nuweb: no ubuntu/debian package
 * funnelweb: inactive(slow) development
 * noweb -L...: (passed to /usr/lib/noweb/mnt) only affect, if the root chunk is ended with "*", like <<*>> or <<...*>>
 * noweb -all,
 * root chunk with white space is silently ignored
 * root chunk like <> is ok, * will be chomp'ed for filename
 * root chunk <<*>> is error
 * why "-L" is only applied to the root chunk that ended with "*" ?
 * ok, one can simply append * to root chunk, if want "-L" to take effect
 * <<....*#line %L "%F"%N>> ?
 * <<....*perl>> ?
 * define in command line like, noweb -Lperl='# line ...' -Lc='# line ...' -L='...' (no language specified)
 * define in config file?
 * <<....*perl>> will also benefit to pretty printing for multi programming language
 * define how to escape char in expanding __FILE__ ?
 * or just define the char to be striped before expanding __FILE__ ?
 * also define the enclosing char? not need, it is too complicate.
 * security issue, arbitrary filename could be overwritten by untrusted noweb file?
 * but untrusted Makefile, configure file could make more severe damage
 * to recognize __FILE__ ?
 * C: printf("@__FILE__") --> "test\"\n.cpp"
 * sql: select "@__FILE__" --> "test""\n.cpp"
 * << : expand, @<< : "<<", @@<< : "@<<", @/**/<< : @ + expand. (prefer this approach)
 * @<< : expand, << : "<<", @/**/<< : "@<<", @@<< : @ + expand
 * -L and "# line ..." already do this task?
 * comment out
 * in doc: use latex comment ("%...")
 * in code: use code comment
 * whole code chunk: use latex comment
 * old version?
 * should not rely on chunk name to manage code version, since programmer may accidentally insert code into old chunk version
 * to have /^< >=/ not being identified as beginning of another chunk, the programming comment could be added,
 * however, there may be the case that the comment is unwanted, for example,

cat << END < >= // unwanted comment ...    END