Re: side-effect-free (was Re: Can solve the N-queens - but can't count!)

Subject: Re: side-effect-free (was Re: Can solve the N-queens - but can't count!)
From: Lars Marius Garshol <larsga@xxxxxxxxxx>
Date: 21 Jun 1999 14:28:02 +0200
* James Tauber
| 
| As I understand, the side-effect-freeness of XSL means that when
| processing this above template, you can go and apply the template
| for C before the template for B, or run both in parallel, etc
| without having to worry that something that applying one template
| does will affect the application of the other.

This is right, but there are other benefits of being side-effect-free
as well (and costs, not to forget). Basically, allowing side-effects
loses many nice mathematical properties of a system (such as
referential transparency) and at the same time dependencies on time
and the sequence of operations enter the system.

A very good explanation of this is in section 3.1 of the wizard book,
also known as 'Structure and Interpretation of Computer Programs', by
Abelson and Sussman. (The latter was one of the inventors of Scheme,
and the book uses Scheme.)

--Lars M.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread