This is the mail archive of the mailing list .

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Variables and constants

> 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)? 

I wasn't involved in the decision, but I've read some of the early working
papers, and as far as I can see the principal rationale was that a language
without side-effects would be capable of incremental rendering, e.g.
starting to display the output before all the input has arrived. I suspect
that in those early days most people expected the language to have a lot
less computational power than it ended up with. The desire to make it
declarative and side-effect free was generally coupled with a
(contradictory) requirement to enable it to call external functions or

There is also an argument that a language without side-effects is capable of
a higher degree of optimisation, is less error prone, and so on. The one
argument I haven't seen in anything I've read is any discussion of ease of
use, ease of learning, or (sacrilege) "why not ask the users what they

Mike Kay

 XSL-List info and archive:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]