Re: [xsl] Better include them in the XSLT 2.0 spec (Was: Re: [xsl] Time for an exslt for 2.0?)

Subject: Re: [xsl] Better include them in the XSLT 2.0 spec (Was: Re: [xsl] Time for an exslt for 2.0?)
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 13 May 2005 08:39:45 +1000
On 5/13/05, Brian Chrisman <incubus@xxxxxxxxxxxxxx> wrote:
> On Fri, May 13, 2005 at 07:49:58AM +1000, Dimitre Novatchev wrote:
> > > The debate with memo-function would be about whether it actually has
any
> > > semantics, or is merely a performance hint. Could a conformant
processor
> > > ignore it? What is the effect on a "creative" function, one that
constructs
> > > new nodes each time it is called?
> >
> > xsl:function -s with side effects should not have been allowed -- in
> > the first place.
> >
> > So it is not only a nice wish to think about memoisation, but probably
> > a pressing need to clean up the spec from functions with side
> > effects.
> >
> > Or be prepared for all kinds of a nasty surprise following the fact
> > that the value of
> >
> >        my:f($x) is my:f($x)
> >
> > is generally not guaranteed to be true()
>
> Is there some other mechanism which would be used to,
> for example, return a random number, other than a function?


A function returning a random number is still a pure function, because
given the same seed it returns the same number or sequence of numbers.

There's no problem with such functions.


Cheers,
Dimitre Novatchev.

Current Thread