[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] The real harm is in functions with side effects (Was:
"Joshua Allen" <joshuaa@xxxxxxxxxxxxx> wrote in message news:0E36FD96D96FCA4AA8E8F2D199320E52BA807D@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > Well, doing so partially defeats the purpose of using XSLT, since it > means your stylesheets will not work in many other systems. It begs the > question, if you find that Java is needed, then why use XSL at all? Why > not just write the app in Java? > > In any case, if you want to still use XSL and be as portable as > possible, I would recommend using the exslt templates at www.exslt.org > before giving up and writing your own extensions. Portability is not the main issue with using extension functions. In many cases an application is designed to work only within a certain known platform/environment (e.g. intranet), which is not going to change. However, even in this case uncontrolled use of extension functions can be dangerous. What I am referring to is that many people are not aware of the harm that functions with side effects may cause in a functional language. In many cases the "need" to use an extension function is due only to the fact that the programmer comes from a procedural background and simply does not want to learn the functional way of programming -- and not because there is no way to do this without extension functions. Due to this reason some nice-looking proposals for new extension functions (which happen to have side effects) have not been accepted by the management of the EXSLT.org group. We need to have a special section in the XSLT FAQ about extension functions and why functions with side effects are generally harmful in a functional language. Dimitre Novatchev. FXSL developer, http://fxsl.sourceforge.net/ -- the home of FXSL Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|