[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:

Subject: The real harm is in functions with side effects (Was: Re: Using Extension Functions - Its Efficiency)
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Fri, 16 Jan 2004 06:52:14 +0100
 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.