RE: key() Re: Saxon VS XT

Subject: RE: key() Re: Saxon VS XT
From: Thorbjørn Ravn Andersen <TRA@xxxxxxxx>
Date: Thu, 10 Aug 2000 11:15:41 +0200
> > You are thinking of comments.  I was referring to actual 
> _documentation_ since that is
> basically what is needed here.  We discussed ways to annotate 
> a functional XSLT file in
> order to produce a new document which serves as the full 
> documentation (i.e. what you ask
> for).  This annotation should be possible for each and every 
> tag, and provide a fuller set
> of possibilities than just adding comments.
> 
> Yes, I know about the 'literate programming'. The mr's Knuth's idea
> and the variations here sound nice, but I doubt anybody can 
> really use it.

Literate programming goes a lot further than just being able to mix code freely with documentation.

I don't believe that "self-documenting code" is possible without some extra information
intented for the reader.  (The computer doesn't care).  

It is possible to use Literate Programming.  Knuth did so himself, so "anybody" is out ;-)

Have you ever tried it?  Have you ever read a well-written program instead of a well-coded program?

The "nuweb" system is written as such a program.  See http://nuweb.sourceforge.net/ for source and documentation, where you should read the PostScript version.  The memory management system of Nuweb _requires_ a verbose explanation.

Nuweb also uses scraps (which is almost redundant in XSLT).



> Road-signs are OK.  But key() is unfortunalty *not* a 'plain' 
> roadsign. I'm explaning
> it in huge letter and if you dont understand what I'm saying 
> here - I can explain it
> again by mail.

It is a tricky construction.  I understand that fully, and I find it complicated to use.  I also understand that you do not like it.

I also recognize that my code runs 2-4 times _faster_ using it (as you also found 
in your reimplementation of Sebastians code), and does so _today_.    With running times of 15 minutes in a production environment (we transform lots of data) this counts.

> 'register' flag does not affect the readabality  of  your code.

I may have picked a poor example in this regard.

Every programming language requires practice to read fluently.



Note: Apologies for my unformatted lines.  I'll look into using another mailprogram.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread