Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: jeff@aiai.edinburgh.ac.UK (Jeff Dalton) Newsgroups: comp.lang.scheme Subject: Fixing the order of evaluation. Minimizing the unexpected. Message-ID: <16864.9104081607@subnode.aiai.ed.ac.uk> Date: 8 Apr 91 16:07:33 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 63 From: Pete Harlan I have to read and understand other people's code a lot. When I look at a combination they've written, I currently don't have to think about whether the order of the arguments matters (unless there is a bug in the program; this sort of bug occurs *rarely*, in my experience). Do the proponents of fixed-order really think this is unimportant information? Do you think that if the order were defined you would have to be more concerned about whether the order matters? My experience has been the opposite. When I read code in a language where the order is defined (e.g., Common Lisp), I almost never have to think about whether the order matters. And if something turns out to depend on the order, so what? It will get the same order in every implementation. From: Aubrey Jaffer gjc and others suggest fixing the order of evaluation. If this order is fixed Scheme will lose the ability to be easily run on multiple processors. This will confine scheme to the dustbin of history. This presupposes that multiple processors are the only future, which is far from clear, and that compilers can't do a sufficient analysis of side effects (or at least not in a way that counts as "easily"), etc. From: Mark Friedman I believe that there is an expressiveness argument in favor of keeping the order of evaluation of combinations unspecified. Scheme has a number of mechanisms for indicating a specific order of evaluation (e.g. LET* and BEGIN). Scheme also has some mechanisms for indicating that the order of evaluation is unimportant (e.g. combinations and LET). The language is more expressive currently than if order of evaluation where always specified because a programmer would have no way to express the fact that order of evaluation was not important. I think that is a valid point, although I would also note that it may be harder to understand LET* now because it is used for two things: order of evaluation and dependence between variables. From: Vincent Manis Some people propose a fairly radical change to Scheme, moving its behaviour away from the norm in modern programming languages. I seem to recall that the order is defined in ML, which is a modern language. The reason was to reduce the number of ways in which different behavior could result. They do so on the fairly vague basis that `it would be more consistent' or `it's more natural' or some such thing. I disagree. There are real benefits to be had from specifying an order. There are additional benefits to be had from specifying a "natural" order. These benefits have not been quantified, but neither are they vague. -- jeff