Subject: Re: [xsl] Re: A proposal:xsl:result-document asynchronous attribute From: Francis Norton <francis@xxxxxxxxxxx> Date: Tue, 11 Mar 2003 00:36:10 +0000 |
Not in the case of a functional language -- distinguishing between a sideI agree that there would have to be a clear distinction, and I have to admit I have no idea how difficult this would or wouldn't be to implement. (I should also have used a less adventurous comaprison, since I triggered at least one recipient's rude-things filter)
effects - free function and one that has side effects -- here this is a
matter of sanity.
Ah - time for me to spend some time with FXSL, perhaps - I think I understand what Monads do in Haskell but never really had that "aha" moment - maybe seeing what you've done in a language I understand better will help.Just to say that a function has side effects is not sufficient. There must be good mechanisms that support the use of functions with side effects, otherwise the result of evaluation will be unpredictable.
This is where the Monad implementation *is necessary*.
It is possible to implement (something like) a general Monad in XSLT if there are higher order functions and at least some kind of primitive controlled lazy evaluation.
Such an implementation has been produced using FXSL. It provides a reliable way of dealing with functions with side effects.
Yes, I'd like to see it done properly. Though I have a feeling that getting it done properly will involve a major culture-transplant to non Haskell-heads such as myself.While this sounds like a justified remark, it remains simply wishful thinking if proper mechanisms to ensure reliable and predictable use of functions with side effects are not in place.
timestamp, randomNumber and interaction with unsafe, non-idempotent web-services would be my favourite "unclean" features.It is highly unlikely that XSLT 2.0 will offer such a mechanism, as it lacks standard support for higher-order functions.
For the time being such support will be provided by the FXSL monadic implementation.
Before publishing the initial implementation I'm trying to collect a number of good-use examples, like maintaining state, update-in-place Arrays, IO from external files, synchronous exceptions.
I would greatly appreciate any other suggestions of possible use of a monadic implementation from interested users.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: A proposal:xsl:result-doc, Dimitre Novatchev | Thread | [xsl] Re: Re: A proposal:xsl:result, Dimitre Novatchev |
RE: [xsl] XSL Error, Jack Cane | Date | Re: [xsl] xpath visualizer for linu, Peter Flynn |
Month |