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

Subject: Re: [xsl] Re: Keeping a running total?
From: Steve <subsume@xxxxxxxxx>
Date: Wed, 12 Jul 2006 14:24:05 -0400
Thank you for your comments.

I suspect I am simply not a high-enough level user to exploit these
benefits to any degree, but I can understand their benefit. However, I
suspect that an option to make variables modifiable--at the expense of
the points mentioned--would come under wide use, quickly. =)

*Goes away for 3 days to understand how Dimitre's solution actually works*

-S

On 7/12/06, Colin Adams <colinpauladams@xxxxxxxxxxx> wrote:

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@xxxxxxxxx>
>Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>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
>

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

Current Thread