[exslt] Reference and First-Class Function
Dimitre Novatchev
dnovatchev at yahoo.com
Tue Dec 16 07:53:36 MST 2008
> I've written a few words about references and firs-class functions
> on the wiki, based on previous discussions. Even if they do not
> necessarily represent a consensus, I thought that would be a useful
> way to support discussions:
>
> http://www.fgeorges.org/exslt2-wiki/Reference
> http://www.fgeorges.org/exslt2-wiki/First-Class_Function
>
I find that relating the topic of "reference" in XPath to the topic of "higher order functions" is both too general and round-about. Remember that the need for references originally arised from needing them in higher-order functions -- for currying. Now we are trying to implement "reference" by currying a function. This is a complete circle.
At the same time I have defined in a quite formal and specific way what a "reference" is (the Ref object) and how to implement it in a way that allows both a reference to be representable by a storable value and to have a strict discipline of creating "copies" of references that can be used independently. This definition also solves the "leakage" problem.
Read it here:
http://lists.fourthought.com/pipermail/exslt/2008-December/001705.html
Another remark is about the following text in the Wiki:
"Implementations
FXSL implements first-class functions and provides several higher-order function. It is entirely written in standard XSLT 2.0.
Retrieved from "http://www.fgeorges.org/exslt2-wiki/First-Class_Function""
FXSL never implemented this even simply due to the fact that FXSL existed 6-7 years before this text was written.
In fact FXSL implements higher-order functions in a completely different way and does not resort to or implement any extension functions.
Finally, we don't need to re-invent HOF in XSLT and implement it in less portable ways while they have already been here for 6 years. Let's save the time of developers and allow them to concentrate on features that are not yet implemented.
Cheers,
Dimitre
More information about the exslt
mailing list