xsl-list
[Top] [All Lists]

Re: [xsl] Re: Keeping a running total?

2006-07-12 11:00:38

This is the normal situation for functional (as opposed to imperative) languages.

Benefits:

1) Transparency - it is far easier to reason about a program that is free from side effects. So
   you can prove your program is correct with less effort.
2) Scalability - pure (side-effect free) programs are much easier to parallelize 3) Learning - variables in functional programs are the same as variables in mathematics - you don't
                  have to learn a new concept (assingment)
4) Debugging - no need to monitor when a variable changes value.
5) Power - you can bind a variable to a function definition, then it can be passed as the argument
               of a function (see FXSL)

Downsides:

1) Performance - functional languages are stil slower than imperative languages, although the gap is closing. 2) Large scale program structure - OO programming seems to have the advantage here.

From: Steve <subsume(_at_)gmail(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Re: Keeping a running total?
Date: Wed, 12 Jul 2006 12:52:59 -0400

Forgive me for the tangent, especially if it sounds ignorant, but as a
newbie to XSL I have a hard time understanding the benefit in not
being able to redefine a variable.  While I do not doubt the talent
and genius that went into the above examples and speculations, I can't
imagine a benefit that outweighs the time economics involved in coming
up with the above solutions, versus simply doing a $variable =
$variable - $x and being done with it in 10ish lines.

Comments welcome.

-Steve

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


_________________________________________________________________
Windows Live? Messenger has arrived. Click here to download it for free! http://imagine-msn.com/messenger/launch80/?locale=en-gb


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--