 |
 |
 |
On Mon, Jun 30, 2008 at 10:31:37PM +1000, Deborah Pickett wrote:
> Case in point: I don't consider XSLT to be functional because of the
> hoops you have to go through to get something resembling lambda
> functions. On the other hand, it's a great model of a declarative
> language, at least my definition of one.
Yes -- strictly speaking XSLT and XQuery are declarative and not
functional -- functions are not first-class objects and the
languages are not based on the lambda calculus & combinator theory.
People use the term "functional" loosely to mean "declarative",
and XSLT and XQuery do have referential transparency: in a
given scope, a "variable" is always bound to the same value,
and although aliasing is permitted, the aliases are not mutable.
This is why you can't write a random number function rand() in
Xquery (say) that returns a different number each time you call it.
> Closures are something I'd be curious to see done in XSLT, though I
> still have never come across a programming problem in real life that was
> best solved by using them.
It's not impossible that we'll see higher-order functions in a
future version of XSLT. They're particularly useful for things
like sorting and grouping, for example.
Liam
--
Liam Quin, W3C XML Activity Lead, http://www.w3.org/People/Quin/
http://www.holoweb.net/~liam/ * http://www.fromoldbooks.org/
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |