[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: Variables and constants
Subject: Re: Variables and constants From: Lars Marius Garshol <larsga@xxxxxxxxxxxxxxx> Date: 25 Feb 2000 15:38:02 +0100 |
* John Lam | | This is more of a philosophical question. Since I haven't worked | with functional programming languages before, can anyone explain to | me the rationale for not having true variables a'la procedural | programming languages (i.e. you can re-assign the value of an | existing variable)? XSLT is not alone in not having assignment, in fact there is a whole family of programming languages called the functional programming languages that work this way. The best-known are perhaps Standard ML and Haskell. (No, Lisp does not belong here. Lisp is imperative, just like the mainstream languages.) The difference between the traditional imperative languages and the functional ones is a deep one and not easily understood. At the deepest level it has to do with whether change (that is, time) is allowed in a program or not. If change is banished, functions always return the same values and reasoning about what is going on in the program becomes enormously much simpler. The best description you are likely to find of what this really means appears in 'The Structure and Interpretation of Computer Programs', by Abelson, Abelson and Sussman. (The book is definitely recommended for anyone who wants to to serious programming, BTW.) | Can anyone shed any light on why variables == constants in XSLT? I'll let this one pass; others can probably answer it much better than me. --Lars M. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Variables and constants, John E. Simpson | Thread | Re: Variables and constants, David Carlisle |
Re: Variables and constants, John E. Simpson | Date | Re: Variables and constants, David Carlisle |
Month |
Keywords