[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] About noweb and literate programming
From: |
David MENTRE |
Subject: |
[Axiom-developer] About noweb and literate programming |
Date: |
Wed, 29 Jun 2005 19:57:03 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Hello Kai and other Axiom developers,
address@hidden writes:
> We get the second field from the string which is the abbreviation.
> <<capture the abbreviation>>=
[...]
> @
> <<srcabbrevs>>=
[...]
> <<capture the abbreviation>>
> (values names longnames))))
> @
Against Tim opinion and use, I would recommend to *never* use the
ability of noweb to include recursively code chunks, for two reasons:
1. technically, noweb code chunk inclusion is a poor man macro system,
which is dangerous and can produce difficult bugs. It does not
handle variable binding as, for example, any Lisp macro system does;
2. personally, I find that it clutters the output and make the reading
not so easy.
I much prefer this style:
<<file.cl>>
(defun blabla ....)
@
<<file.cl>>
(defun blibli
(blabla ....))
@
Other than that ;-), I strongly agree with Tim that literate programming
is a huge step towards having long term maintainable code. For what it
is worth, I'm developing my own pet project with noweb. You'll find the
produced output and source code in following links.
http://www.linux-france.org/~dmentre/demexp/latest-src/demexp-book-0.5.1.pdf
http://www.linux-france.org/~dmentre/demexp/latest-src/demexp-0.5.1.tar.gz
Yours,
d.
--
David MENTRE <address@hidden> -- http://www.nongnu.org/axiom/