Re: [xsl] concern of garbage collection with functional languages

Subject: Re: [xsl] concern of garbage collection with functional languages
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Sep 2016 08:32:21 -0000
I've seen a number of attempts to write XSLT processors in languages without
garbage collection (typically, C or some derivative). Some were successful,
some failed, but in all cases half the design effort was working out how to do
memory management efficiently. By contrast, I've seen XSLT processors
implemented in languages such as Java, C#, and Haskell that do have garbage
collection, and the memory management largely takes care of itself. Not
entirely - you still have to worry occasionally about which objects need to be
retained[*] - but that's the exception rather than the rule.

[*] An example in Saxon is the use of indexes for documents, constructed as a
result of the xsl:key declaration. Does the index belong to the source
document, or does it belong to the compiled stylesheet? Saxon carefully uses
weak references to ensure that the index is kept in memory so long as BOTH the
source document AND the compiled stylesheet are in memory.

Michael Kay
Saxonica


> On 27 Sep 2016, at 04:25, Mukul Gandhi gandhi.mukul@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Hi all,
>    I've been reading in computer science literature off late, that
implementing functional languages behind the hoods do not do garbage
collection (good languages must do garbage collection). Can this be a concern
for a language like XSLT? Particularly, XSLT 1.0 version where MSXML is not
implemented in Java (that offers automatic garbage collection)?
>
>
> with best regards,
> Mukul gandhi
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/293509> (by email <>)

Current Thread