 |
 |
 |
> That link was to a discussion on transitive closures (a property of graphs),
> not the closures I was talking about
> [http://en.wikipedia.org/wiki/Closure_(computer_science)]. Not so much OO
> as one way to implement OO.
>
But *that* kind of closure has also been implemented and around for a
long time.
Any partial application of
foo(x1,x2,..., xN)
over its first N - k arguments "is a function that is evaluated in an
environment containing one or more bound variables" -- in this case N
- k bound variables.
This was first made available for XSLT 1.0 in FXSL 1.x in 2002 here:
http://fxsl.sourceforge.net/articles/PartialApps/Partial%20Applications.html
The same approach, but implemented using the much higher expressive
power of XSLT 2.0 (using the <xsl:function> instruction) was
implemented around 2004 in FXSL 2.0 and is discussed here:
http://www.idealliance.org/papers/extreme/proceedings/xslfo-pdf/2006/Novatchev01/EML2006Novatchev01.pdf
To summarize, we have had closures (as defined at
[http://en.wikipedia.org/wiki/Closure_(computer_science)]) in XSLT for
many years.
--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
On Tue, Jul 1, 2008 at 3:37 AM, Deborah Pickett
<debbiep-list-xsl@xxxxxxxxxx> wrote:
> Dimitre Novatchev 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.
>>> [...]
>>
>> Not exactly lambda-functions, but various ways of creating dynamically
>> new functions are well-known and have been supported with FXSL for
>> years:
>
> [snip]
>
> Yes, those hoops are the ones I was talking about.
>
>>> 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.
>>
>> Has been done for quite some time; see:
>> http://dnovatchev.spaces.live.com/blog/cns!44B0A32C2CCF7488!384.entry
>
> That link was to a discussion on transitive closures (a property of graphs),
> not the closures I was talking about
> [http://en.wikipedia.org/wiki/Closure_(computer_science)]. Not so much OO
> as one way to implement OO.
|
 | 

|  |
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.
|  |
| |
 |
 |
 |