Subject: Re: saxon impressions From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 9 Jul 1999 15:52:09 +0100 (BST) |
> Yes, it constrains the processing to be in the natural sequential order. > Like most other languages I use every day! Seems like a big loss. One of the benefits of functional languages is that they are inherently parallelisable. If functions are side effect free you can dispatch them off to be evaluated in any suitable order, or in particular, simultaneously. > (When I asked the question on this list, what is it about stylesheets that > makes the side-effect-free processing model particularly suitable, I got one > response that made sense: the potential for partial regeneration of an > output document if part of the source document changes. Not only if it changes. Even if it is static. If you have a 1000 page book and you want to look at the index (assuming this index is in the source file, not generated on the fly by the stylesheet) Then in a side effect free language you can start processing the nodes for the index and just process earlier nodes if explicitly referenced. With a saxon stylesheet you would presumably have to process the entire book to make sure that any state variable are correctly initialised before you start the index. That is by having global variables you are forcing a particular order on the traversal of the input tree, an order that may or may not be suitable for the ordering required on the result tree. > My current feeling is that the mental contortions needed to write > transformations in a side-effect-free way are a heavy price to pay for > that feature. Strange, I have always found that the functional model was the more natural one, expressions being evaluated and returning results, not having strange side effects all over the place. I suppose it takes all sorts:-) David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: saxon impressions, Kay Michael | Thread | RE: saxon impressions, Kay Michael |
Re: Q: pattern selection for outsi, G. Ken Holman | Date | RE: pattern selection for outside t, Vun Kannon, David |
Month |