XSLT是声明式的,而不是有状态的。尽管XSLT基于函数式编程思想,但它不是一种全功能的编程语言,它缺乏将函数视为一类数据类型的能力。它有像懒惰评估这样的元素来减少不必要的评估,也没有显式循环。
像一个函数式语言,我认为它可以很好地与自动并行安全的多线程处理器。
从:
这是使用。 FXSL是一个实现对高阶函数支持的库。
由于FXSL的原因,我认为XSLT本身并不需要完全实现功能。也许FXSL将在未来被纳入W3C标准,但我没有证据证明这一点。
Several questions about functional programming languages have got me thinking about whether XSLT is a functional programming language. If not, what features are missing? Has XSLT 2.0 shortened or closed the gap?
XSLT is declarative as opposed to stateful.
Although XSLT is based on functional programming ideas, it is not a full functional programming language, it lacks the ability to treat functions as a first class data type. It has elements like lazy evaluation to reduce unneeded evaluation and also the absence of explicit loops.
Like a functional language though, I would think that it can be nicely parallelized with automatic safe multi threading across several processors.
From Wikipedia on XSLT:
Here is a great site on using XSLT as a functional language with the help of FXSL. FXSL is a library that implements support for higher-order functions.
Because of FXSL I don't think that XSLT has a need to be fully functional itself. Perhaps FXSL will be included as a W3C standard in the future, but I have no evidence of this.
这篇关于XSLT是一种功能性编程语言吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!