References in XPath that can be represented by a string and still can be garbage collected

"Vladimir Nesterovsky" <[email protected]> Thu, 18 Dec 2008 11:57:10 +0200
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
Hello,

I've read an article
http://www.fgeorges.org/exslt2-wiki/References_in_XPath_that_can_be_represented_by_a_string_and_still_can_be_garbage_collected.
It seems to me that the idea of explicit "Resource Manager" object
goes against the spirit of functional programming.

Except that I think it has technical flaws.
Processor has a great freedom to reorder operations.
This potentially may lead to dereferencing something
that was not referenced.

I think the better way to is to introduce a map in exslt 2, and
then build (unique-string, object) map to store the binding.
What do you think?
--
Vladimir Nesterovsky
http://www.nesterovsky-bros.com