Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!zephyr.ens.tek.com!tekgen!sail!toma From: toma@sail.LABS.TEK.COM (Tom Almy) Newsgroups: comp.lang.lisp Subject: Re: weird common lisp feature Keywords: read, read-line Message-ID: <9026@sail.LABS.TEK.COM> Date: 25 Feb 91 16:37:43 GMT References: <12413@helios.TAMU.EDU> <1991Feb21.104336.26012@Think.COM> <18935@brahms.udel.edu> <964@creatures.cs.vt.edu> Reply-To: toma@sail.LABS.TEK.COM (Tom Almy) Organization: Tektronix, Inc., Beaverton, OR. Lines: 30 In article <964@creatures.cs.vt.edu> lavinus@csgrad.cs.vt.edu () writes: >Everyone seems to be missing a basic point of Lisp philosophy: If you do >something like (foo a) (foo2 b), you should not count on that being evaluated >left-to-right or right-to-left. Generally, it is good programming practice >(in general, but especially in Lisp) not to make any assumptions about order >of evaluation unless the *language* (not the compiler) guarantees some >particular order (the only example I can think of offhand is C - it guarantees >order of evaluation of most everything). I believe you are exactly backwards on this, with one small exception. Quoting from CL:TL (2nd Edition) page 75: "X3J13 voted in October 1988 to clarify that while the arguments in a function call are always evaluated in strict left-to-right order, whether the function to be called is determined before or after argument evaluation is unspecified." On the other hand, from "The C Programming Language" (1st edition) pages 49 and 50: "C, like most languages, does not specify in what order the operands of an operator are evaluated." "Similarly, the order in which function arguments are evaluated is not specified." -- Tom Almy toma@sail.labs.tek.com Standard Disclaimers Apply