xsl-list
[Top] [All Lists]

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

2016-09-27 03:32:27
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(_dot_)mukul(_at_)gmail(_dot_)com 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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 <>)
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>