[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[no subject]

[no subject]
The FP idiom, sporting lazily and readily optimizable computation, suggests
that functions can be forced to produce a result (i.e. actually calculate
something) only when the result is needed for some ultimate calculation.
This is achieved thru side-effect-free realization of functions.  Given
this, then a side-effect-free aware functional optimizer can execute
"stuff" in any order (so long as the computations have no side-effects).
Somehow, the notion of calculation, in an FP sense, sublimes time and
therefore ordering of output.

Now, the FP alphabet of functions includes as its signature functions,
"map", "fold" (aka "reduce") and so on.

However "so on" rarely includes "foreach" as a signature function of the FP
idiom.  Is this because "foreach" implies some kind of time ordered
calculation, and therefore not optimizable?

Noting that xsl:foreach always produces the same ordered output (in a
result document), does this imply that XSLT breaches the pure FP idiom,
recognizing, of course, that XSLT has never claimed to be an FP language?

Perhaps I've been eating too much monadic fungi, but there seems to be a
something about the essence of "foreach" as opposed to, say, map, in an FP
context that needs explanation.

Whatever the explanation, it still seems difficult to me to say what the
heck of a kind of a language XSLT actually is :-)


Justin Johansson

P.S. Dimitre, thanks for your response on a prior thread :-

> The woe for me however is having to counter the screams I'll no doubt get
> from the library-developer (Javascript) users & also the hassle of
> converting indexes on the external library side

This is the least problem you might have. Be ready to explain why an
xsl:variable cannot be modified...  :)

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.