xsl-list
[Top] [All Lists]

Re: [xsl] Re: OOXML

2008-07-01 09:36:05
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>